INSERT INTO query involving Dates

A

aaearhart

I have this table:

WORKWEEKS.WeekID [number] (auto number primary key)
WORKWEEKS.WeekNumber [number] double
WORKWEEKS.WeekStart [date/time] medium date
WORKWEEKS.WeekEnd [date/time] medium date

now i could go in and manually enter all the work weeks for each year for
eternity, but i'd really rather not.

instead, i'd like to write a query that would insert into the WORKWEEKS
table after i've entered in the initial work week for the year.

WeekNumber would be +1 of the previous record's WeekNumber
WeekStart would be +1 of the previous record's WeekEnd
WeekEnd would be +6 of that record's WeekStart

then i have the question about next year: say i get this sorted out and 2005
comes to a close. Would the 2006 date overwrite 2005? or would i go in and do
another manual entry for Week 1 2006 and keep all dates in the same table?

Thanks muchly!
/amelia
 
Top