Set Focus to the Form not the Subform

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

Guest

I have created a form that has three subforms. Upon opening, the focus is on
the first field in the first subform. I want the focus to be on a text box
that resides on the main form so that I can easily use a command button to
search the main form. How do I set the focus to be the text box on the main
form?
 
Thank you for the quick response. That worked perfectly.

Sprinks said:
In the OnOpen event procedure:

Me![YourTextBox].SetFocus

AccessIM said:
I have created a form that has three subforms. Upon opening, the focus is on
the first field in the first subform. I want the focus to be on a text box
that resides on the main form so that I can easily use a command button to
search the main form. How do I set the focus to be the text box on the main
form?
 
AccessIM said:
I have created a form that has three subforms. Upon opening, the
focus is on the first field in the first subform. I want the focus
to be on a text box that resides on the main form so that I can
easily use a command button to search the main form. How do I set
the focus to be the text box on the main form?

Even easier than executing a code statement to set the focus, just make
that text box the first control in the main form's tab order.
 
Back
Top