Two SubForms and SetFocus

M

Martin

Dear,
I have trouble trying to setfocus to a text object in a second subform. I
have no problem setting focus to any text objects in the first level a
subform, but the subform within it, I failed.

Here is the scenario, say I have FORM_A from the beginning, which contains
a subform container, named SubFormContainerFirst, and this
SubFormContainerFirst is associated with FORM_B, and it has an text object
named Text_B
In FORM_B, I have the second subform container, named
SubFormContainerSecond, and this is associated with a form called FORM_C.

If I have a text object named Text_C in FORM_C,
Would you be able to show me how to setfocus to it?

My successful attempt to setfocus on Text_B which is from
SubFormContainerFirst is:
Forms!FORM_A.SubFormContainerFirst!Text_B.SetFocus

Please let me know if I am not making clear to my question.

Thank you for your assistance.
Martin
 
R

RuralGuy

Dear,
I have trouble trying to setfocus to a text object in a second subform. I
have no problem setting focus to any text objects in the first level a
subform, but the subform within it, I failed.

Here is the scenario, say I have FORM_A from the beginning, which contains
a subform container, named SubFormContainerFirst, and this
SubFormContainerFirst is associated with FORM_B, and it has an text object
named Text_B
In FORM_B, I have the second subform container, named
SubFormContainerSecond, and this is associated with a form called FORM_C.

If I have a text object named Text_C in FORM_C,
Would you be able to show me how to setfocus to it?

My successful attempt to setfocus on Text_B which is from
SubFormContainerFirst is:
Forms!FORM_A.SubFormContainerFirst!Text_B.SetFocus

Please let me know if I am not making clear to my question.

Thank you for your assistance.
Martin

It will take three SetFocus lines when run from FORM_A:

Me!SubFormContainerFirst.SetFocus
Me!SubFormContainerFirst.Form!SubFormContainerSecond.SetFocus
Me!SubFormContainerFirst.Form!SubFormContainerSecond.Form.Text_C.SetFocus
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
R

RuralGuy

RG,
Thank you! It worked. Have a great day. Martin

You're very welcome. Glad I could help.
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top