Gustav Brock
Gustav at cactus.dk
Wed Jan 10 11:04:36 CST 2007
Hi Keith If you can count on the weeks you can create two queries which retrieves the year and weeknumber of each table from the date. Now join these queries in a new query by the year and the weeknumber. If a two-week window is allowed for one of the tables, round the weeknumber up or down to even or uneven in the query for that table. For example: WeekEvenUp = -Int(-WeekNumber / 2) * 2 WeekOddUp = -Int((-WeekNumber + 1) / 2) * 2 + 1 /gustav >>> Kwilliamson at RTKL.com 10-01-2007 16:58 >>> Hi all, Anyone have a solution for how to link two tables with different dates? I have a Payroll Paid table, with field: DatePaid I also have a Timesheet table, with field: TimesheetEndDate The DatePaid field is a bi-weekly date. The TimesheetEndDate field is usually a weekly date, but occasionally there is a supplemental timesheet date. What I am trying to do is link the Timesheet table for all dates that fall within the 13 days prior to, and including, the DatePaid. So, for DatePaid of 11/29/06.....I want to link all Timesheets with a TimesheetEndDate falling 13 days prior to, and including 11/29/06. Anyone have a solution for that? Thanks kindly, for any help. Keith E. Williamson | Assist. Controller| kwilliamson at rtkl.com