moving from form to embedded form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with and embedde form. the user uses the tab key to enter date
in the main form. and a tab key puts him in the embedded form. once in the
embedded form the user has to press ctrl and tab to get out of the embedded
form and back into the main form. Is there any way to change this ctrl tab
to just another single key stroke.
 
I have a form with and embedde form. the user uses the tab key to enter date
in the main form. and a tab key puts him in the embedded form. once in the
embedded form the user has to press ctrl and tab to get out of the embedded
form and back into the main form. Is there any way to change this ctrl tab
to just another single key stroke.

Normally a Subform is used to enter records in the "many" side of a
one-to-many relationship, so Microsoft assumed that the user would
ordinarily want to stay in the subform until they were done. Hence the
different keystroke to get out.

If a particular subform is always (or typically) used for just one
record, you can put a textbox in the subform. Put it last in the tab
order, and hide it behind some other control so the user can't
mouseclick into it. In its GotFocus event put

Private Sub txtRelay_GotFocus()
Parent.SetFocus
Parent.SomeControlName.SetFocus
End Sub

to set focus to the desired control on the parent form when the user
tabs out of the last data-bound control on the subform.

John W. Vinson[MVP]
 
Thanks John, the sub form is a many side of a one to many relationship. the
user enters the date and som othere information about that date then has to
enter employees and their hours. So there is sometimes 3 sometimes 4 or 5
employess that have worked that day. I see now that it would not be possible
to change. I just had a little brain laps. thanks for your response.
 
Back
Top