Forcing data entry to be done in tab order (1 Viewer)

sonny123

Registered User.
Local time
Today, 19:24
Joined
Apr 8, 2011
Messages
31
I want to force the data input to be done in a specific order(the forms tab order)

I suppose the simplest way would to prevent the mouse from interacting with form completely. and force the data in-putter to rely solely on the Keyboard. (a few googles revealed no clues as to how this might be achieved)

I could do an after update event for each control which sets all subsequent controls in the tab order to Null

but i dont want the data in-putter to miss control one and enter a dozen more fields Only to be told that he cant save the record because control 1 is required and he missed control One and then when he enters control one on the form all the subsequent fields require re-entry. It would annoy the hell out of the data in-putter.

So logically i'm thinking as well as writing the afore mentioned Afterupdate event event for each control I would have to write some sort of before update event for each control which checks that all previous controls in the tab order contain a valid entry.

But now were talking about doing quite a bit of code (which I'm not averse to if needs must), but my gut tells me that less code is better code.

Is this not a reasonably common Issue of sorts?
perhaps I cant find the answer cos Im still very green with access and VBA

all sugesstions help or advice much appreciated
 

colkas

Registered User.
Local time
Today, 19:24
Joined
Apr 12, 2011
Messages
128
Hi

Not sure if you mean Tabs or fields.. If its fields then in each property of the field is a section called Tab Index.... You can set these in the order you want them to be accessed so 1 first then 2 second etc.... no matter where they are placed on your form they will jump to the next number.....

Like you I am not to up on coding so hopefully some of the other guys in here can help...
 

sonny123

Registered User.
Local time
Today, 19:24
Joined
Apr 8, 2011
Messages
31
Cheers.
I have my Tab order worked out and set, so no probs there
I'm kinda trying to get to grips with with the events & syntax
and im experimenting with things like

Code:
If Me![DateOpened] = Null Then Forms!Main!DateOpened.SetFocus

but not working properly as yet
 

spikepl

Eledittingent Beliped
Local time
Today, 20:24
Joined
Nov 3, 2010
Messages
6,142
The .Enabled property of a control can be used to enable/disable it for input. You can disable all but one at the beginning, and in the AfterUpdate of each enable the next one. You could label each control with an additional big fat visible 1, 2 etc.

Another way of doing what you want would be to create a series of forms, akin to a Wizard, so there is no doubt as to the required sequentiality of events.


Your input "scheme" seems weird. Because people are people, and they make mistakes and change their mind. If "reentry" in a prior control invalidates all subsequent entries, then do wipe them. Users wil cotton on to it pretty quickly, provided it makes sense to them. If it doesn't, reconsider.
 

sonny123

Registered User.
Local time
Today, 19:24
Joined
Apr 8, 2011
Messages
31
The .Enabled property of a control can be used to enable/disable it for input. You can disable all but one at the beginning, and in the AfterUpdate of each enable the next one.

Thats the ticket I reckon!!

If "reentry" in a prior control invalidates all subsequent entries, then do wipe them.

yes I understand
this is why it may seem weird but, if a prior control is changed it will invalidate some of the subsequent ones particulary some of the combos which will need to be set null and requeried. Im on that!

Users wil cotton on to it pretty quickly, provided it makes sense to them.
part of the problem is that what is being inputted doesnt make sense/ or theyre just on auto pilot and not really paying attention. the aim here is to focus the inputter but hopefully without annoying them too much

Many thanks
 

Users who are viewing this thread

Top Bottom