Set focus to subform field

gojets1721

Registered User.
Local time
Yesterday, 22:55
Joined
Jun 11, 2019
Messages
430
I'm trying to set the focus to a subform's field from the parent form, but I can't seem to get it working. Here's what I tried via VBA:

Code:
Me!subform1.Form!txtsubformfield.SetFocus

Any suggestions
 
SetFocus is very popular, but I hardly ever use it. The object reference used is sufficient to transfer a value or accept a value.
 
I'm trying to set the focus to a subform's field from the parent form, but I can't seem to get it working. Here's what I tried via VBA:

Code:
Me!subform1.Form!txtsubformfield.SetFocus

Any suggestions
Me.SubForm1.Form.Controls("SubForm field name here").SetFocus
might work.
 
Code:
[Forms]![MainFormName]![subform1].SetFocus
[Forms]![MainFormName]![subform1].Form![subformfield].SetFocus
 

Users who are viewing this thread

Back
Top Bottom