Formula Referencing of a field on a tabcontrol and subform

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Using Access 2003:
My main form has a tab control on the bottom and on a particular tab is
a subform. On this particular subform is a field is a date. I want to
reference that field so that I can use it in formulas on other tabs and
subforms. The hierarchy looks something like this:

[Main Form]
[TabData] - Tab control
[Moving Departing Subform]
[dstatdateleft] - date field

Using the Visual Basic Immediate Window, I tried this:
?Forms![Main Form]![TabData]![Moving Departing Subform]!dStatDateLeft
or
?Forms![Main Form]![Moving Departing Subform]!dStatDateLeft

But I can't get the full reference. I am trying to get the full
reference so that if I have my main form open, I can then use the
reference in various places.

Can anyone help me?
Thanks
 
Mike said:
Using Access 2003:
My main form has a tab control on the bottom and on a particular tab is
a subform. On this particular subform is a field is a date. I want to
reference that field so that I can use it in formulas on other tabs and
subforms. The hierarchy looks something like this:

[Main Form]
[TabData] - Tab control
[Moving Departing Subform]
[dstatdateleft] - date field

Using the Visual Basic Immediate Window, I tried this:
?Forms![Main Form]![TabData]![Moving Departing Subform]!dStatDateLeft
or
?Forms![Main Form]![Moving Departing Subform]!dStatDateLeft

But I can't get the full reference. I am trying to get the full
reference so that if I have my main form open, I can then use the
reference in various places.


The second one usually works, but to be sure, you should
use:
Forms![Main Form]![Moving Departing
Subform].FORM!dStatDateLeft

Make sure that [Moving Departing Subform] is the name of the
subform **control** on the main form. The control might
have a dfiierent name than the form it is displaying.
 
Back
Top