Connecting Tech Pros Worldwide Help | Site Map

Prompt User Response

Member
 
Join Date: Jul 2007
Posts: 46
#1: Mar 10 '08
I have a Parts form with a number of fields. Basically what I want to do is force the user to input values in a certain order on the form when a new record is created. The idea I had was to make all other fields invisible and set focus on the field that requires input, but I'm not sure what the best way to program a "wait for input and then go to next line of code" functionality would be achieved.

The way I was thinking to do it would be tedious and probably way overkill. Could anyone give me a few pointers or tips?

Thanks!

CB55
jeffstl's Avatar
Expert
 
Join Date: Feb 2008
Posts: 413
#2: Mar 10 '08

re: Prompt User Response


For unlocking the controls you want to be entered in a certain order, you can use the event "OnLostFocus".

This way when a user tabs, or clicks off the control they just entered data into, within that event you would code your validation (checking to see if they entered data) then just simply make the next field in your order become unlocked or visible.

In order to code this in an organized fashion you could place all your validations and unlocking\hiding code in a single function that is called for each controls "OnLostFocus" event and pass that function the name of the control, and its number in the order (probably could just use the Tab Order).

The only question I guess is do you leave the previously filled out field(s) locked or hide them again? If you do (hide\lock them) it may be difficult to code in a way to go back and let them correct a previous entry.
Member
 
Join Date: Jul 2007
Posts: 46
#3: Mar 10 '08

re: Prompt User Response


I don't need to hide the controls after data has been put in. I didn't think of the OnLostFocus event, thanks a lot for the help! I'll post a followup to report back how it goes.
Reply