View Full Version : Sum a report


rgreene
10-22-2003, 07:34 AM
I have a database that tracks Continuing Education classes attended by employees. On the form I enter the employee, class, Cost, Gas, and Hotel. I have a report that gives me a total sum for each of the Cost, Gas, Hotel and Other fields (=sum([Cost])) now I want to add the totals of those 4 fields and subtract that amount a budget figure.
Ex..
$10000-((Cost)+(Gas)+(Hotel)+(Other))
Where the $10000 is in a field (BAmount)

Right now my report shows
Cost = $3,664.50
Hotel = $1,000
Gas = $75
Other = $500
So by my totals it should = $5239.50

So $10000-$5239.50 = $4760.50

Right now my code is:
=Sum([Cost]+[Hotel]+[Gas]+[Other]) (Just to get the total)
and it returns an amount of $1,775.

Any suggestions?

Rick

neileg
10-22-2003, 08:02 AM
=Sum([Cost]+[Hotel]+[Gas]+[Other]) This does not make sense.

Do you mean =Sum([Cost])+Sum([Hotel])+Sum([Gas])+Sum([Other])

or

=[Cost]+[Hotel]+[Gas]+[Other]

rgreene
10-22-2003, 08:18 AM
Ok I did the =Sum([Cost])+Sum([Hotel])+Sum([Gas])+Sum([Other]) and that got me the correct $ amount. Now how do I subtract that from 10000?

rgreene
10-22-2003, 08:23 AM
Got it THANKS neileg you got me pointed in the right direction!!