parameter value when using table field in report

G

Guest

When I use an expression such as: =[invoiceQuery2]![field1], in a text box in
a report I am asked for the parameter value. The only way to get rid of this
is to add this field to the report and then hide it (which I would do for an
iif statement or a calculation with a couple of fields), but I also have the
problem that it doesn't give me query fields as options to add. How can I
avoid this? What am I missing? thanks
 
A

Allen Browne

Sometimes Access tries to be too smart, and it doens't bother fetching data
for fields if there is no control bound to that field. The solution (as you
found) is to add a text box bound to the field, and set its Visible property
to No. Access then fetches the data for the field, and so your expression in
another control's ControlSource works.

BTW, just:
=[field1]
will do, without the [invoiceQuery2] part (unless you have multiple fields
named Field1 returned in the query.)
 

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