Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help on form control reference

Status
Not open for further replies.

Dave1901824

Technical User
Jun 13, 2008
2
US
I have a form - frmCoreTest
On this form I have a Tab Control - tabCtl30
On the first Tab Control page - Page31
I have a subform - frmCore
On this subform I have a Combobox with a number of values - 1 to 9

How do I refer to the value of the combo box to be used in a macro condition?

I have tried [Forms]![frmCoreTest]![page31].[Form]![frmcore].[contract type]=9 and every conceivable variation but haven't got it yet.
Can anyone help?
 
Ignore the tab control and pages:

Me.[Name of Subform Control].Form.[Name of Control]

Where Me can either stay as it is or take the name of the main form; [Name of subform control] is the name of the subform control on the main form, not the name of the form contained, however, the names are often the same; Form stays as it is, it is the form property of the subform control; and [Name of Control] changes to the name of the subform control you wish to reference.
 
Thank you ever so much. I'd been at that for hours and your answer worked like a charm.
 
I have a mental block on remembering that syntax for some reason. I have to look it up every time.

I'll archive this thread so I know where to look next time! :)

Ed Metcalfe.

Please do not feed the trolls.....
 
Dave1901824 . . .

A worthy reference: Refer to Form and Subform properties and controls

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top