thandel
asked on
How do get focus to a particular field
I have a form that contains a sub form which contains another subform. I need to get focus to a particular field on the 2nd sub form. The user could be any where in the main form, sub form or the sub-sub form.
How can I code in a way to get to a text box in the sub-sub-form? I know there is me and me.parent (??) but it isn't always working depending on where the user is when the present code is executed.
Thank you.
How can I code in a way to get to a text box in the sub-sub-form? I know there is me and me.parent (??) but it isn't always working depending on where the user is when the present code is executed.
Thank you.
ASKER
I guess that is the issue.... I don't know where the user is when the macro is executed.
It isn't. The question is only from where the code will be run. If it's a macro, your safest bet is to fully specify everything. Replace Me. with the full reference Forms!frmYourMainForm. and you will be ok.
(°v°)
(°v°)
ASKER
OK, but I"m not using VB but rahter the Macro gui... is your solution possible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Me.subControlName.SetFocus
Me.subControlName.Form.sub
Me.subControlName.Form.sub
(°v°)