Tab to subform

  • Thread starter Thread starter danc09
  • Start date Start date
D

danc09

Using A97, I have a form with subform and have a tab problem going from the
form to the subform. I want to enter the subform on the first field when
leaving the form. However, when I press enter from the form to go to the
subform the cursor always ends up in the last field entered in the subform
not on the first field.
I tried code in the subform GotFocus to SetFocus to the first field but that
did not work. I tried code in the forms last field to SetFocus to the first
field in the subform but that did not work either. I'm pretty sure the code
was correct.
Please help.
Thanks,
Dan
 
Change the tab order of the fields in the subform so that your desired field
is the first field in the tab order.
 
I have done that. Still, when you press enter on the last field of the form
to get to the subform, the cursor always goes to the last field that it was
in from the previous subform.
Dan
 
Yes, that is the behavior of ACCESS in this situation. It remembers the
focus from when you last were in the subform.

You could use the Enter event of the subform control to change the focus to
the desired field in the subform. Keep in mind that this will happen
everytime you enter the subform, of course.

Or, use code in the subform to change the focus to the desired field BEFORE
you leave the subform, that way the focus will be where you want it when you
return to the subform.
 
Back
Top