how to show the total of the currency field on a report

  • Thread starter Thread starter hhasssanin
  • Start date Start date
H

hhasssanin

Gentelmen,

trying to add all currency fields of a table
and show it at the bottom of a report.
I made a query using the wizard that adds the totals fine.
then I made a text box at the footer of the report
and set the control source property to

=[Expenses Totals]![Sum Of AmountSpent]

where Expenses Totals is the name of the query
and Sum Of AmountSpent is the place of the total.

when I run the report I get a msgbox titled Enter Parameter Value and
captioned Expenses totals then the report shows #Error in the total
textBox.

any hints apreciated
Thank you
H Hassanin
 
Worked fine,
Thank you.
H Hassanin
Marshall Barton said:
hhasssanin said:
trying to add all currency fields of a table
and show it at the bottom of a report.
I made a query using the wizard that adds the totals fine.
then I made a text box at the footer of the report
and set the control source property to

=[Expenses Totals]![Sum Of AmountSpent]

where Expenses Totals is the name of the query
and Sum Of AmountSpent is the place of the total.

when I run the report I get a msgbox titled Enter Parameter Value and
captioned Expenses totals then the report shows #Error in the total
textBox.


You can not just refer to a field in a query. Something has
ti initiate running the query.

On way is to use the DLookup function in the text box's
control source expression:

=DLookup("[Sum Of AmountSpent]", "Expenses Totals")

But, if you have more that just a couple of field totals in
the query, you would probably be better off using a
subreport based on your query.
 
works fine
thank you
H Hassanin
Marshall Barton said:
hhasssanin said:
trying to add all currency fields of a table
and show it at the bottom of a report.
I made a query using the wizard that adds the totals fine.
then I made a text box at the footer of the report
and set the control source property to

=[Expenses Totals]![Sum Of AmountSpent]

where Expenses Totals is the name of the query
and Sum Of AmountSpent is the place of the total.

when I run the report I get a msgbox titled Enter Parameter Value and
captioned Expenses totals then the report shows #Error in the total
textBox.


You can not just refer to a field in a query. Something has
ti initiate running the query.

On way is to use the DLookup function in the text box's
control source expression:

=DLookup("[Sum Of AmountSpent]", "Expenses Totals")

But, if you have more that just a couple of field totals in
the query, you would probably be better off using a
subreport based on your query.
 
hhasssanin said:
trying to add all currency fields of a table
and show it at the bottom of a report.
I made a query using the wizard that adds the totals fine.
then I made a text box at the footer of the report
and set the control source property to

=[Expenses Totals]![Sum Of AmountSpent]

where Expenses Totals is the name of the query
and Sum Of AmountSpent is the place of the total.

when I run the report I get a msgbox titled Enter Parameter Value and
captioned Expenses totals then the report shows #Error in the total
textBox.


You can not just refer to a field in a query. Something has
ti initiate running the query.

On way is to use the DLookup function in the text box's
control source expression:

=DLookup("[Sum Of AmountSpent]", "Expenses Totals")

But, if you have more that just a couple of field totals in
the query, you would probably be better off using a
subreport based on your query.
 
Back
Top