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
 
Make sure the textbox is named something other than the
name of your data.
Fons
 
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.
 

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

Back
Top