Move to a field on a subform

  • Thread starter Thread starter Denise
  • Start date Start date
D

Denise

I have designed a form with a subform. When I loose focus
on the last field of the form, I want to move to the first
field on the subform but I can't seem to get my code
right. Does anyone know how to do that?

Thanks,
 
Include another text box at the end of the tab order on your main form. It
must be visible, but can be sized extremely narrow so it is almost
unnoticable.

In its Got Focus event procedure:
If Me.Dirty Then
Me.Dirty = False
End If
Me.[NameOfYourSubformContolHere].SetFocus

BTW, are you aware that you can include an ampersand in the attached label
of a control to jump to that control? For example, to jump out of the
subform again and back to the Surname field on the main form, set the
caption of the label of teh Surname text box to:
&Surname
and Alt+S jumps there.
 
Back
Top