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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform control criteria 1

Status
Not open for further replies.

macca007

Programmer
May 1, 2004
86
0
0
GB
Hi, all

Basically i am tryin to make a reference to control that is on a subform.

The main form is called Patient4
the subform is called frmTreatmentSecton
and the control (textbox) is called txtClinDet

the criteria i came up with is this:
[Forms]![Patient4]![frmTreatmentSection].[form]![txtClinDet]

but doesn't seem to work,

could any of u look and see where i have gone wrong

cheers
 
That is exactly right, provided the subform CONTROL on the main form has the same name as the subform. It is the control name (not the subform name) that you must use.
 
thanks for the reply lupins46

Could you explain that more clearly, don't know what you said.
 
When you add a subform to a form you are really adding a subform control (from the toolbox. This control has a name just the same as a textbox or button or combo box has a name. The name is initially set to the name of the subform that you choose ( just like a textbox name is initailly set to the field it contains) but if you change the subform name or chnage to a different subform, the subform control still has its original name.
Display the properties box and click the edge of the subform. The properties box will show Subform/Subreport in the properties box title bar and the Name property will give you the name.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top