refering to a subform on a tabbed page

  • Thread starter Thread starter Ken Ivins
  • Start date Start date
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
 
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,

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
 
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]
 
Back
Top