Date Query

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
 
J

Jeff Boyce

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Allocating Dates 3
How do I have a listbox in a form update a query 2
Date Computation 6
Date and Time Condition 3
Date Calculation Parameter 5
Comparing dates in a worksheet 2
form headers 2
main form - subform 5

Top