View Full Version : A Report accessing two tables


darthpaul
07-19-2007, 10:57 AM
The database I have create is very simple, I am calculating the number of checks printed for each job an operator prints, which is just a matter of subtracting the begining number minus the starting number plus 1. There is also the possibility of spoils and these are added to another table. I want to create a printed report for each job printed, "Company Name", "starting number", "ending number", "total checks" and "spoils". I want to show a single entry for each job but how do I display the spoils when I don't know how many there will be if any?

HiTechCoach
07-19-2007, 12:41 PM
You might want to use a sub report.

Bilbo_Baggins_Esq
07-22-2007, 04:57 AM
You should probably be keeping all your records in one table, including the spoils, but since you've got them seperate:

Write a query based off the two tables.

Perform a left join between the two tables on the common column
This will allow a count of the spoils if there are any and not exclude other records when there are no spoils.

Then base your report off this query instead of the tables