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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Focus on a sub Form

Status
Not open for further replies.

CLOS

MIS
Jan 30, 2002
23
US

I have a form with a sub-form that I need to set focus on the fields within the sub-form. How do I set this up? I don't have a problem doing it on the main
form, but I need to do it on the sub-form. Help! Help! Help! , Thanks.
 
CLOS

You need something like:

Forms!myFormName!mySubFormName!mySubFormControl.SetFocus

pjm
 
I have used...
me.childform.form!field_Name.setfocus

That may work as well.

HTH
Ken
 
You might find that you need to set the focus explicitly to the subform first, then set the focus to the desired control.

MyForm!Subform.SetFocus
MyForm!Subform!MyControl.SetFocus

You could also use the ME keyword:

Me!Subform.SetFocus
Me!Subform!MyControl.SetFocus


HTH

Lightning
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top