parameter value when using table field in report

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.)
 
Back
Top