Date Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with a field that requires the user to input a date (DATE1),
then another combo box that requires the user to also select a period based
on the financial calendar that (DATE1) falls into.

eg. if a date of 31/1/2005 was entered they would select 'week 45' from the
week ending combo box.

Once 'week 45' is selected it would then automatically populate the 'week
ending date', as it is linked in a query.

What I am trying to create is a query or other that when the user enters
DATE1, it automatically fills in the both other fields.

eg. (DATE1) 31/1/2005 selected by user
Week 45 and 6/2/2005 automatically populated.

Any help would be greatly received.
Many thanks in anticipation
 
If I were trying to accomplish this, I would use the date-related functions
in Access, and use the Format() function. If I recall correctly, you can
format a date (your "31/1/2005") as a week #. If you are using a
non-calendar year, you will need to create your own function that converts a
date to a week #.

Also, I believe you could use the day-of-week function to find the ?Saturday
(day 7?) that follows the day-of-week of your Date1...
 
Back
Top