Using a total from a Query

CCIDBMNG

Registered User.
Local time
Today, 15:01
Joined
Jan 25, 2002
Messages
154
I am working on a payroll database. I have everything finished except I need to sum values from a query and place the total on a report. Everytime the payroll report is ran I take 10% of the final pay and append it to a reserve table. I want to be able to show the their total reserve on the report so each employee can keep track. I know there is an easy way to do this but I just can't think of it right now.
 
You want to total the amount in the Reserve Table?

Is that the total on the reserve table or the total per employee on the reserve table?
 
Let me explain this a little better. I have 2 main tables. The first table is a running list of all orders that a rep has sold. We generate our payroll based on this table. We have a thing called reserve here and what we do is take 10% from everyone's pay and when they quit they receive a check of all their reserves. Right now I have a separate report to calculate the total reserve if an employee calls in asking for it. To make things easier we want to show the current reserve total on the payroll report. So I want to sum up all the reserve totals the employee has in the reserve table and place that value on the report. I know how to put it on the report but I don't know how to get the value.
 
If you have a report so you can tell any employee at any given time what reserve they have you have the answer there. That must have 2 queries behind it. One which takes all records relevent to the employee from table reserve, and a second which totals the values in the reserve field (i.e. amount of cash).

Just use the output of the second query as the value to put on your payrole report.

Maybe I'm getting something wrong here again.....
 
You're right I'm sorry I wrote something wrong. I know how to get the total using a query but how do I place that value on the report if I have a text box called ReserveTtl. I don't know the code to use.
 
I'm going to leave this one open to the floor. Cause, while I have done something very similar I don't remember exactly how to do it and I haven't time to go looking for the DB in question now.

Maybe Tomorrow if I get a chance and Noone else has resolved your problem

Shane :)
 
Either use a subreport or DLookup/DSum on an unbound textbox on the main report
 

Users who are viewing this thread

Back
Top Bottom