Make the cursor jump to the field I want after i press a bottom

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

Guest

Pls help me find out the way to make the cursor jump from a sub-form to other
sub-form in the same form.
 
On the LostFocus event of the last field in the first sub form, run the code
that et the focus to the field in the second sub form

Me.Parent.[SecondSubFormControlName].Form.[TextBoxName].SetFocus
 
Pls help me find out the way to make the cursor jump from a sub-form to other
sub-form in the same form.

A couple of ways. Ctrl-Tab will tab out of the subform to the next control in
the mainform's tab order; you could make this the next subform. If you want to
jump automatically after you fill in the last control in the first subform's
tab order, you can put an additional textbox on the subform; hide it behind
some other control, and in its GotFocus event put

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

to set the focus to a specific control in the second subform.

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

Back
Top