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

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
 
H

hhasssanin

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.
 
H

hhasssanin

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.
 
M

Marshall Barton

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.
 

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