Refer to a control in a subform

I

Ivor Williams

I have a form frmSite with a subform sfrSiteMaterial. On the subform is a
textbox txtProjNo.

I want to generate a report which uses as a datasource a query. In the query
is a field ProjNo. I want to set the criteria in this field to refer to the
textbox in the subform. Can someone please tell me the proper syntax for
doing so?

Thanks,
Ivor
 
A

Allen Browne

Try:
[Forms].[frmSite].[sfrSiteMaterial].[Form].[txtProjNo]

Explanation:
Referring to Controls on a Subform
at:
http://allenbrowne.com/casu-04.html

If it still doesn't work, it is possible that the Name of the subform
control is not the same as the name of the form loaded into it (i.e. its
SourceObject.)
 

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