View Single Post
 
Old November 20th, 2007, 09:08 AM
SerranoG SerranoG is offline
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Just some observations.

If your field is called DATE, change the name. It will intefere with the Access function Date() in calculations and statements.

Even if there is more data besides date and date commencing in your table. You should not actually storing date commencing. You should be just recalculating it on the fly when you need it based on the date. You're storing extra data that's bloating your dB size.

The Sunday prior to any date is simply

Date Commencing = DateAdd("d", -1 * Weekday([YourDateField]) + 1, [YourDateField])


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division