To tab to different controls you need some code to determine
which control gets the focus. If it is already going to
different controls, you must have some code in there now.
If so, it should be in the combo box's Exit event procedure,
but you might find it in the LostFocus event. I would
expect the code to be something like:
Select Case cboTypeOfViolation
Case "Moving, Equipment, License/Registration"
Me.txtResultOfStop.SetFocus
Case "Moving Violation"
Me.cboTypeOfMovingViolation.SetFocus
End Select
Your form is probably using different names for the controls
so change my guesses to the real names. If the Type of
Violation combo box really has a numeric value from a lookup
table, then change the Case statements to the appropriate
numbers.
If the hour is always entered as two digits (e.g. 03) then
you can "autotab" to the minutes text box using this kind of
code in the hours text box's Change event procedure:
If Len(Me.txtHour) = 2 Then Me.txtMinutes.SetFocus
but I don't like doing that because it doesn't give users a
chance to correct a mistake.
You should review the tab order list to make sure all the
other controls are in a user friendly order.
As far as changing the data when you change the form. It is
unlikely, but you do have to make sure you do not change a
value in a bound control. The changes we've discussed so
far will affect any data, only the navigation from one
control to another.
--
Marsh
MVP [MS Access]
Pat said:
The first question. This is a database made by the Illinois Dept. of
Transportation, IDOT, and I'm trying to make the entering of the database
easier. When I am in the form and I answer one of the drop down lists, (for
ex. "Type of Violation" - answer being the list "Moving, Equipment,
License/Registration") when I tab the curser automatically goes to the wrong
place to enter the next data. Changing the tab order doesn't work because
depending on the answer picked the curser has to go to different places. If
"Moving Violation" is picked then it needs to tab to "Type of Moving
Violation" which is another list box. If "Equipment Violation or
License/Registration Violation" it needs to skip "Type of Moving Violation"
and move directly to "Result of Stop". It is also weird that sometimes it
does go to the right place but not consistantly. If I keep entering Moving
Violation tickets it will go to the right place. But as soon as I enter
"Equipment or License/Registration" it goes to a different place and
sometimes back to the beginning of entry at the top of the page.
For the 2nd question, I have no idea why IDOT wrote this form this way for
the time. It doesn't make sense at all to me. But I was wondering if there
was a way I could make it more enter-friendly by just having to type 2314 and
not 23 tab 14.
Just one more question. My IT guy at work is wondering if my changing the
form would change the data we send to IDOT. I said no that the form is
separate from the table the data is in and it wouldn't change anything in the
table where all the data is. Is this correct?