set focus to subform control

cliff7376

Registered User.
Local time
Today, 21:36
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
 
try

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

in your onload event for your form

didnt test it. might work though
wink.gif


lemme know if it doesnt
 
[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

Back
Top Bottom