Grand total on a report based on a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query which pulls sales for a customer. On the query, my "cost"
field comes from my Sales table. I then created columns for Sales Tax and
Total Sale.

I then created a report based on this query (created an invoice). All fields
are functioning properly except for my Grand Total. I tried to generate a
total as a sum of the "Total Sale" field that I calculated in the Sales
query. The result was an error. I then read in this forum that you can not
create a total on a control. As a test, I then tried to create a total on the
"Cost" field (which was my original field in my Sales table). I still get and
error in this field. I am still making a mistake, I'm just not sure what it
is...
 
Assuming the name of the field in your underlying query is "Total Sale", you
probably just have to surround the fieldname with brackets in your equation.

In this case, the control source of a textbox in the report or section
footer should be =sum([Total Sale])

Also, if there is a chance of a null value, you may want to consider
=sum(nz([Total Sale]))
 
My syntax was just as you have it.

I tried something, though...I created a group and a Group Total, then I tied
my Grand Total to the group total. Grand Total works fine now. Thanks for
your help.
--
Robert Robinson


Vel. said:
Assuming the name of the field in your underlying query is "Total Sale", you
probably just have to surround the fieldname with brackets in your equation.

In this case, the control source of a textbox in the report or section
footer should be =sum([Total Sale])

Also, if there is a chance of a null value, you may want to consider
=sum(nz([Total Sale]))



Robert Robinson said:
I have a query which pulls sales for a customer. On the query, my "cost"
field comes from my Sales table. I then created columns for Sales Tax and
Total Sale.

I then created a report based on this query (created an invoice). All fields
are functioning properly except for my Grand Total. I tried to generate a
total as a sum of the "Total Sale" field that I calculated in the Sales
query. The result was an error. I then read in this forum that you can not
create a total on a control. As a test, I then tried to create a total on the
"Cost" field (which was my original field in my Sales table). I still get and
error in this field. I am still making a mistake, I'm just not sure what it
is...
 
Back
Top