Access a subform in a query

N

Nigel

What is the sysntax to refer to a subform in the conditions statement of a
query I tried the following

[forms]![orders]![subform].[orderdetail]![pricetable]

but that doesn't work

thanks
 
J

John Spencer

I'm not sure that you can reference a subform's controls in a query. As I
recall the expression service won't handle this.

I believe that what I have done in the past (long ago and far away) was to add
a control to the main form (visible = no) and either set the value of the main
form control from the subform or reference the sub-form control as the source
of the main form control.

All of this is based on my notably faulty memory.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 

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