Query field won't display in report

C

cbart

I'm sure this will be an easy one for someone. I have a query that has a
field that sums up a grand total. I want that grand total field to display
in my report. I can't get it to work with the control source option. I've
tried a lot of things, but I keep getting syntax errors that mean nothing to
me. Using Access 2003 and I'm trying to add the field to an existing report.
Any ideas? Thanks much!
 
F

fredg

I'm sure this will be an easy one for someone. I have a query that has a
field that sums up a grand total. I want that grand total field to display
in my report. I can't get it to work with the control source option. I've
tried a lot of things, but I keep getting syntax errors that mean nothing to
me. Using Access 2003 and I'm trying to add the field to an existing report.
Any ideas? Thanks much!

Is the query the record source for the report?
If so, then the grand total field should be in the Field List tool
button. Just drag it onto the report.

If the query is NOT the record source for the report, you can use, as
the control source of an Unbound text control:
=DLookUp("[GrandTotalFieldName]","QueryName")
 
C

cbart

Thanks fredg! It wasn't on the list so I used the expression you suggested.

fredg said:
I'm sure this will be an easy one for someone. I have a query that has a
field that sums up a grand total. I want that grand total field to display
in my report. I can't get it to work with the control source option. I've
tried a lot of things, but I keep getting syntax errors that mean nothing to
me. Using Access 2003 and I'm trying to add the field to an existing report.
Any ideas? Thanks much!

Is the query the record source for the report?
If so, then the grand total field should be in the Field List tool
button. Just drag it onto the report.

If the query is NOT the record source for the report, you can use, as
the control source of an Unbound text control:
=DLookUp("[GrandTotalFieldName]","QueryName")
 

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