Unanswered: summing totals based on user selections of dates
this is a difficult question to ask, but i'll try anyway.
i have two tables containing a pay date, an employee number and the pay for that pay date (2 tables because of two different methods to keep track of pay).
in a form, the user of the DB selects a start date and end date for which they wish to find out how much an employee was paid in that range of dates. for example:
in my form, in one textbox, the user specifies the start date, for instance, 20020903 (sept.3, 2002) and an end date 20020905. i want to generate a query that sums the totals from each table for each employee, for instance:
Hopefully, you have a table of Employees that you can link these two table to. If so, try this:
left outer join Table1 on Employees.empno = Table1.empno and Table1.paydate between StartDate and EndDate
left outer join Table2 on Employees.empno = Table2.empno and Table2.paydate between StartDate and EndDate