Command button on Subform

  • Thread starter Thread starter T3
  • Start date Start date
T

T3

First a disclaimer. I am a rookie at code, so please be
gentle.

How can I create a command button to return the cursor to
a specific field on the main form?

Thanks!
 
T3 said:
First a disclaimer. I am a rookie at code, so please be
gentle.

How can I create a command button to return the cursor to
a specific field on the main form?

Thanks!

Suppose the control you want to go to on the main form is named
"txtFoo". Then your command button's Click event procedure should look
something like this:

Private Sub cmdYourButtonName_Click()

Me.Parent!txtFoo.SetFocus

End Sub

Substitute the name of your command button for "cmdYourButtonName", and
the name of the control on the parent form for "txtFoo".
 
Back
Top