DaveDeeter
06-07-2002, 01:10 PM
I have four tables in which I post Money received. I am trying to run a query to total the money deposited daily from each table over a period of a month.
For example I need columns as follows:
Date Civil Records Other Suspense
The problem I am having is getting the total for each day from each table.
Can someone help me?
David R
06-07-2002, 01:44 PM
If you need to get an overall total at some point, you're going to have difficulty because your data structure is not properly normalized.
Try this instead, in one table:
DateField AmountDeposited Category
---------+---------------+---------
10/21/2002 $47.53 Suspense
10/21/2002 $13.22 Records
etc...
Now you can just Sum the AmountDeposited field, and Group By the DateField (don't call the field Date, it will cause you problems with Access since it is a reserved word).
If you have to keep them in separate tables, i.e. the data is linked from different branch offices, then you'll have to do a UNION query to get them all in one column, or make another query to add the four totals. Neither will be as flexible if you have to add a fifth category later, however.
Good luck,
David R