set focus to subform control (1 Viewer)

cliff7376

Registered User.
Local time
Today, 21:34
Joined
Oct 10, 2001
Messages
107
I have a main form (frmshipment)that when i open it i would like to have the cursor in one of my subform(fselshipment1) fields called txtSalesOrderID. i tried one of the solutions but it didn't work my code was this

Me.Child119.Form.txtSalesOrderID.SetFocus

can anyone help me. thank you
 

Raza

Registered User.
Local time
Today, 21:34
Joined
Jan 29, 2002
Messages
12
try

forms![formname]![subformname]![fieldname].setfocus

in your onload event for your form

didnt test it. might work though


lemme know if it doesnt
 
J

Jerry Stoner

Guest
[Forms]![FormName].[SubFormName].[Form].[ControlName].SetFocus

You may have to set focus to the subform then the control:

[Forms]![FormName].[SubFormName].SetFocus
[Forms]![FormName].[SubFormName].[Form].[ControlName].SetFocus
 

Users who are viewing this thread

Top Bottom