Calculating inside queries..

xChase

New member
Local time
Today, 15:03
Joined
Jun 10, 2010
Messages
2
I have three columns: ExpType, ExpDepartmentID and ExpAmount.
Inside the ExpType there are various values, some of which are Stationery, some are Computers etc.

What I need to do is to grab all the values that are Stationery, and add them all together in one query, and then do the same for Computers, in the same or in a different query.

Any help?
 
Piece of cake.

Set the criteria for your ExpType to be the value you want.
You can either do three different queries, or perhaps point it to a field on your form and let your user choose which value.

Click on the totals button to show the totals row. For ExpAmount, instead of 'Group By' change it to Sum.

This should do it!
 
Oh thats great, thanks :D. Now this is probably a silly question, but how do I make the output appear in $?
Like $4504.00
 
but how do I make the output appear in $?

Got to the format property of the field in question and select Currency IF your default regional settings is in $

If not type this in the format property if you want thousand seperator

Code:
$# #00

or if you just want $4526
Code:
$00

You can then set the desimal property if you want cents

JR
 

Users who are viewing this thread

Back
Top Bottom