problem setting focus to a subform

  • Thread starter Thread starter BradC
  • Start date Start date
B

BradC

I have a contacts database as follows:
Main screen called: MainViewContacts
Subform on MainViewContacts called InvoiceInfo
Searches form to enter criteria to search database

How do I set the focus back to the subform InvoiceInfo on
the MainViewContacts form. I can set the focus to fields
in MainViewContacts just fine. I just cannot move it to
the subform.

Thanks
Brad
 
To set focus to a subform control on the main form:

me.InvoiceInfo.setfocus

To set focus to a field on a subform control:

me!InvoiceInfo.form!FieldOnSubform.setfocus

HTH,
Debbie


|I have a contacts database as follows:
| Main screen called: MainViewContacts
| Subform on MainViewContacts called InvoiceInfo
| Searches form to enter criteria to search database
|
| How do I set the focus back to the subform InvoiceInfo on
| the MainViewContacts form. I can set the focus to fields
| in MainViewContacts just fine. I just cannot move it to
| the subform.
|
| Thanks
| Brad
 
Just to clarify, you must use both SetFocus steps to move focus from a main
form to a control on a subform:

Me.InvoiceInfo.SetFocus
Me.InvoiceInfo.Form.ControlOnSubform.SetFocus

Or you can use this syntax:

Me.InvoiceInfo.SetFocus
Me.InvoiceInfo!ControlOnSubform.SetFocus


where InvoiceInfo is the name of the subform control (the control on the
main form that holds the subform).
 
Back
Top