Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Activate Subform

Status
Not open for further replies.

TimTDP

Technical User
Feb 15, 2004
373
ZA
I have a main form containing a subform.
I use the command
Forms!frmMainForm.Form!frmSubForm!Id.SetFocus to move to the Id field in the subform.
However the main form remains the active form.

How can I make the sub form the active form?
I need to do this because I want to create a recordset on the subform.

Thanks in advance
 
It should probably be

[tt]Forms!frmMainForm!frmSubForm.Form!Id.SetFocus[/tt]

but, I think you'll also need to setfocus to the subform itself

[tt]Forms!frmMainForm!frmSubForm.SetFocus[/tt]

- and be carefull not to use the same names on form controls, as the fields they are bound to, it may come back an bite you...

Roy-Vidar
 
Hi Roy-Vidar

Thanks for the reply, but it did not help.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top