Tab order into subforms

L

L. R. Hurtado

Hello there:
I do have a problem. I have a form which contains a few subforms. I want to
be able of after the first subforms gets the focus, jump into the next
subform as it is written in the tab order for the main form. Is there any way
I can do so?
I hope somebody can give me a hand out there.
 
J

John Vinson

Hello there:
I do have a problem. I have a form which contains a few subforms. I want to
be able of after the first subforms gets the focus, jump into the next
subform as it is written in the tab order for the main form. Is there any way
I can do so?
I hope somebody can give me a hand out there.

Do you want to enter just *one* record in each subform? Subforms are
generally designed to allow entry of multiple records (they're usually
used for the "Many" side of a one to many relationship).

You can type Ctrl-Tab to tab out of the subform; or - if you really
only want to enter one record in each subform, for some reason - you
can put an unbound textbox last in the tab order in each subform. Put
it behind an existing textbox (so the user can't click into it), but
leave it visible (or they can't tab into it); in its GotFocus event
put code like

Private Sub txtRelay_GotFocus()
Parent!nextsubformname.SetFocus
Parent!nextsubformname.Form!controlname.SetFocus
End Sub

using the name of the next subform and of an appropriate control in
that form.

John W. Vinson[MVP]
 
Top