Form Fields in tab order and required sometimes

graceusguide

New member
Local time
Today, 11:05
Joined
Jan 10, 2010
Messages
6
Hi,

I hear anything is possible if you are willing to program. I am very rusty with my VBA. My issues is I have a data entry form where I have 11 fields, 8 fields users enter in all the time, but rarely they need to enter in the last 3 box's. I have therefore made the last 3 box's not in the tab order (Tab stop = No) like the other box's. What I want though, if the user manually selects the first of these 3 box's and entered data, that the tab stop for the next 2 box's in that record is returned.

It is also a dream that if any of these last 3 box's is entered into, that all 3 box's are required to have data.

Any Suggestions?
 
What I want though, if the user manually selects the first of these 3 box's and entered data, that the tab stop for the next 2 box's in that record is returned.

Comes to mind first, on the Arrive method of those three special fields, adjust the three fields tab stop property to True.

On the Depart method, set the tab stop back to False, in case the person mouse clicks on a field other than those three special fields.

It is also a dream that if any of these last 3 box's is entered into, that all 3 box's are required to have data.

This is done by adding some validation logic before the record gets INSERTed / UPDATEd in the table. If the validation rule does not check out True, then skip the DB commit and return the user to fix their mistakes. Depends on how you have build the form - bound vs unbound... what type of DB object you are dealing with (DAO / ADO), etc... but yes in general that type of thing may be added.
 

Users who are viewing this thread

Back
Top Bottom