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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SUMUP Fields

Status
Not open for further replies.

sheikhasad

Programmer
Joined
Oct 17, 2003
Messages
1
Location
US
dear brothers

i have a database in which i want to calculate the overall sum. Description given below:

Sr# ItemName ItemCode Rate Qty Amount




Total --------
How to calculate this sum over a group?

Thanks!



 
First of all the Amount column MUST be an already calculated field within your recordsource query. You see you cannot perform a group SUM on a calculated field within the Detail Section. So, modify your recordsource to make sure that the query includes a calculated field AMOUNT which is the product of Quantity * Rate.

Now in the Detail section your control's control source can now be this new field(Amount). In the group footer and report footer you can now have a control with a control source that looks like this to get the figure that you want:

Code:
=Sum(Me![Amount])

This should work for you now.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
I think this won't work without taking out the "Me!"

Try
=Sum([Amount])


Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Dhookup is correct here. The Me! is inappropriate for this summing expression. Thanks for catching that.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top