data from other queries on a report

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

I'm trying to add some data from other (not Record Source)
queries on my Report into TextBox on the Report Footer
area. For the TextBox I'm entering into Control Source
some =(SELECT ....). But, when I open the report I
have "#Name?" in the TextBox place.

Does anybody know how I could add some data from the
different from the Record Source query on my report?

Thanks
 
You can't use a select statement as a control source. You can use:
=DLookup("SomeField","SomeQuery","Some Criteria")
 
Alex said:
I'm trying to add some data from other (not Record Source)
queries on my Report into TextBox on the Report Footer
area. For the TextBox I'm entering into Control Source
some =(SELECT ....). But, when I open the report I
have "#Name?" in the TextBox place.


You can not use a query in a control source.

You can use the DLookup function, but if you need more that
a very few values tha will be slow.

For several values, you should us code to open a recordset
and assign the desired values to the controls.

If there are a lots of values, it is usually worth the
effort to use subreports that are bound to the other
queries.
 
Back
Top