Tabbing Out of Continuous Subform

T

tbl

Is there a way to set a subform (continuous) so that after
the last record (in the subform) is entered, and the user
has tabbed to the new record row, tabbing again will move
the focus out of the subform, to the next control on the
main form (without having to use the Control key)?
 
J

John W. Vinson

Is there a way to set a subform (continuous) so that after
the last record (in the subform) is entered, and the user
has tabbed to the new record row, tabbing again will move
the focus out of the subform, to the next control on the
main form (without having to use the Control key)?

Typically a Subform is used to enter multiple records. How can the computer
determine that *this* record is in fact the 6th of 6, rather than the 6th of
13? The telepathic user interface won't be coming out until Access version...
oh, I shouldn't mention that...

If you routinely enter one and only one record in the subform, you can put a
textbox on the subform. Make it the last control in the subform's tab order;
it must be visible and enabled, but you can hide it behind some other control
so it won't be inadvertantly clicked with the mouse. In its GotFocus event put

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


You need both setfocus events - to set focus to the parent form, and then to a
control on that form.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top