On main form current event set focus to a subform field

  • Thread starter Thread starter David Portwood
  • Start date Start date
D

David Portwood

Upon current event of the master form I want to set focus to a control
inside a subform. Seems like no matter what I do, focus goes to the first
tab-able field on the main form.

Does anyone know of a way to do this?
 
David Portwood said:
Upon current event of the master form I want to set focus to a control
inside a subform. Seems like no matter what I do, focus goes to the first
tab-able field on the main form.

Does anyone know of a way to do this?

You should be able to set focus to the subform (which becomes the active
control on the main form) using Me.Subformname.setfocus.

However, the first field in the tab order of that subform will then be the
active field. If you want to activate a different field, you may be able to
that with a setfocus method in the GotFocus event of the subform.
 
Back
Top