refering to a subform on a tabbed page

K

Ken Ivins

I know this should be easy but I am not getting it. I need to refer to a
textbox on a subform located on a tabbed page (see below). What is the
proper format.

Main form = frmMain
Sub Form = subfrmVacation
Textboxes = txbYearBegin txbYearEnd
Tab = tbTimeOut

Between [Forms]![frmMain].[subfrmVacation].[txbYearBegin].[Form]![tbTimeOut]
And [Forms]![frmMain].[subFrmVacation].[txbYearEnd]

Thanks for your help,
Ken
 
R

Roger Carlson

Simply pretend that the tab control does not exist:

Between [Forms]![frmMain]![subfrmVacation].[Form]![txbYearBegin]
And [Forms]![frmMain]![subFrmVacation].[Form]![txbYearEnd]

BTW, you also had the .Form in the wrong place. Also, make sure the
"subfrmVacation" is the name of the subform CONTROL on the main form and not
the name of the subform itself.
 
K

Ken Ivins

Roger,

My problem was the sub folder name. some times it takes a second pair of
eyes.

Thanks,
Ken



Roger Carlson said:
Simply pretend that the tab control does not exist:

Between [Forms]![frmMain]![subfrmVacation].[Form]![txbYearBegin]
And [Forms]![frmMain]![subFrmVacation].[Form]![txbYearEnd]

BTW, you also had the .Form in the wrong place. Also, make sure the
"subfrmVacation" is the name of the subform CONTROL on the main form and not
the name of the subform itself.

--
--Roger Carlson
www.rogersaccesslibrary.com
Reply to: Roger dot Carlson at Spectrum-Health dot Org



Ken Ivins said:
I know this should be easy but I am not getting it. I need to refer to a
textbox on a subform located on a tabbed page (see below). What is the
proper format.

Main form = frmMain
Sub Form = subfrmVacation
Textboxes = txbYearBegin txbYearEnd
Tab = tbTimeOut

Between [Forms]![frmMain].[subfrmVacation].[txbYearBegin].[Form]![tbTimeOut]
And [Forms]![frmMain].[subFrmVacation].[txbYearEnd]

Thanks for your help,
Ken
 
J

John Vinson

I know this should be easy but I am not getting it. I need to refer to a
textbox on a subform located on a tabbed page (see below). What is the
proper format.

Main form = frmMain
Sub Form = subfrmVacation
Textboxes = txbYearBegin txbYearEnd
Tab = tbTimeOut

Between [Forms]![frmMain].[subfrmVacation].[txbYearBegin].[Form]![tbTimeOut]
And [Forms]![frmMain].[subFrmVacation].[txbYearEnd]

It is not necessary (or even allowed) to refer to the tab page at all;
what you need is the Name property *of the subform control*, which is
often but not necessarily the same as the name property of the form
within that control. Try the syntax:

Between [Forms]![frmMain]![subfrmVacation].Form![txbYearBegin]
And [Forms]![frmMain]![subFrmVacation].Form![txbYearEnd]
 

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