On main form current event set focus to a subform field

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?
 
S

Stephen at ZennHAUS

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.
 

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

Similar Threads


Top