Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control Source Expression builder giving "#Name?" error 1

Status
Not open for further replies.

cctonto

Programmer
Jun 16, 2002
22
US
I'm trying to get a text box in a report to read a query result. I use the expression builder for the Control Source to find the query and then the field within the query. It looks like this:

= [DCASH_After_Layaway_Inventory]![SumOfTotal]

This seems all correct but then I get "#Name?" error for the field.

I need to display several fields on the report, all fields comming from different queries.

Access 2002

-Thanks-
 
sounds like the query is not part of the report?
try dlookup - it will get data from tables and queries that are not part of the report's recordsource.

=dlookup("SumOfTotal","DCASH_AfterLayaway_Inventory")

this will pull that value.
If you only want to pull that value for a certain record, you'll have to put the criteria in as well:

dlookup("SumOfTotal","DCASH_AfterLayaway_Inventory","ID = " & [ReportID])

where the "ID" in the query is equal to the "ReportID" (or whatever you call it) in the Report.

Hope this helps--g
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top