Reference a control on a tab

  • Thread starter Secret Squirrel
  • Start date
S

Secret Squirrel

On one of my tabs I have a subform. On my tab (vacation) I have a text
control that shows a certain value. I need to pull that value to the subform
to a specific control. I tried using this;

=frmEmployeeMain!Vacation!VacationOverrides

Is that how I would reference a tab?Vacation is the name of the tab.
VacationOverrides is the textbox I want to pull the value from.
 
S

Secret Squirrel

Hi Tom,

Long time no talk. Hope all is well...

That didn't work. Maybe I'm not explaining it correctly. On my main form I
have a tab control. On the "vacation" tab I have a text box called
"VacationOverrides". Also on the vacation tab I have a subform called
"frmVacationSubform". What I want to do is pull the value from the textbox
"VacationOverrides" and put it in a textbox on my subform. I'm not pulling a
value from the subform to the main form. I'm doing the exact opposite. I'm
pulling a value from the main form to the subform but because I have a tab
control I'm not sure how to set it up.

Tom Wickerath said:
Hi Secret Squirrel,

I believe you need to reference the name of the control that holds the
subform, not the name of the tab. The control in question is the same one
that includes the Link Master Fields / Link Child Fields properties.

= Me![NameOfSubformControl]![VacationOverrides]


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

Secret Squirrel said:
On one of my tabs I have a subform. On my tab (vacation) I have a text
control that shows a certain value. I need to pull that value to the subform
to a specific control. I tried using this;

=frmEmployeeMain!Vacation!VacationOverrides

Is that how I would reference a tab?Vacation is the name of the tab.
VacationOverrides is the textbox I want to pull the value from.
 
S

Secret Squirrel

I got it to work. I used =Forms!frmEmployeeMain!VacationOverrides

I didn't realize that you don't have to use the tab name when doing this.

Tom Wickerath said:
Hi Secret Squirrel,

I believe you need to reference the name of the control that holds the
subform, not the name of the tab. The control in question is the same one
that includes the Link Master Fields / Link Child Fields properties.

= Me![NameOfSubformControl]![VacationOverrides]


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

Secret Squirrel said:
On one of my tabs I have a subform. On my tab (vacation) I have a text
control that shows a certain value. I need to pull that value to the subform
to a specific control. I tried using this;

=frmEmployeeMain!Vacation!VacationOverrides

Is that how I would reference a tab?Vacation is the name of the tab.
VacationOverrides is the textbox I want to pull the value from.
 

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