By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,064 Members | 1,449 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,064 IT Pros & Developers. It's quick & easy.

How to refer to a subform control which is on a tab control? (tabstrip)

100+
P: 176
This is something I haven't found about on the net, even though it seems to me like it could be a common question. The task is simple: I have a ControlName.Value which is on Subform which is on page 1 of a TabCtrl.

I've tried -
(I'm not using code brackets, since this is an incorrect code)
Me!TabCtrl.Form!2!Subfom.Form!NameControl.Value = Me.Name2.Value
and
Me!TabCtrl!2!Subform.Form!NameControl.Value = Me.Name2.Value

What is the correct code?
Thanks.
Dec 16 '06 #1
Share this Question
Share on Google+
2 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
This is something I haven't found about on the net, even though it seems to me like it could be a common question. The task is simple: I have a ControlName.Value which is on Subform which is on page 1 of a TabCtrl.

I've tried -
(I'm not using code brackets, since this is an incorrect code)
Me!TabCtrl.Form!2!Subfom.Form!NameControl.Value = Me.Name2.Value
and
Me!TabCtrl!2!Subform.Form!NameControl.Value = Me.Name2.Value

What is the correct code?
Thanks.
You don't need to refer to the tab page just the subform

Expand|Select|Wrap|Line Numbers
  1. [Forms]![MainFormName]![SubformName].Form![NameControl] = Me.Name2
  2.  
this should do it, you don't need the .Value

Mary
Dec 16 '06 #2

missinglinq
Expert 2.5K+
P: 3,532
Continuing what Mary said about not needing to refer to the tabbed page, tab pages are merely extensions, if you will, of the form. All controls on tabbed pages are referenced as they would be if they were on a regular, non-tabbed form.
Dec 16 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.