If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Two SubForms and SetFocus
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 |
#2
|
|||
|
|||
On Wed, 24 Aug 2005 10:22:04 -0700, Martin
wrote: 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.SetFocu s 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!SubFormContainerSeco nd.SetFocus Me!SubFormContainerFirst.Form!SubFormContainerSeco nd.Form.Text_C.SetFocus _______________________________________________ hth - RuralGuy (RG for short) Please post to the NewsGroup so all may benefit. |
#3
|
|||
|
|||
RG,
Thank you! It worked. Have a great day. Martin "RuralGuy" wrote: On Wed, 24 Aug 2005 10:22:04 -0700, Martin wrote: 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.SetFocu s 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!SubFormContainerSeco nd.SetFocus Me!SubFormContainerFirst.Form!SubFormContainerSeco nd.Form.Text_C.SetFocus _______________________________________________ hth - RuralGuy (RG for short) Please post to the NewsGroup so all may benefit. |
#4
|
|||
|
|||
On Wed, 24 Aug 2005 12:57:03 -0700, Martin
wrote: 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. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How can I move the focus to a control on a subform? | Brandon | General Discussion | 7 | July 17th, 2004 01:39 AM |
Multiple Subforms Search | Kentucky5 | Using Forms | 3 | July 6th, 2004 06:23 AM |