A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Two SubForms and SetFocus



 
 
Thread Tools Display Modes
  #1  
Old August 24th, 2005, 06:22 PM
Martin
external usenet poster
 
Posts: n/a
Default 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  
Old August 24th, 2005, 08:24 PM
RuralGuy
external usenet poster
 
Posts: n/a
Default

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  
Old August 24th, 2005, 08:57 PM
Martin
external usenet poster
 
Posts: n/a
Default

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  
Old August 25th, 2005, 02:11 AM
RuralGuy
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 04:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.