Question Date Range Query

Shazz

Registered User.
Local time
Yesterday, 19:04
Joined
Oct 14, 2008
Messages
53
Hi Guys,

I have a Holiday Database that keeps a record of Holidays, sickness and appointments, it work perfect except the year always runs Jan to Dec, I would like to be able to choose how each years fruns for each person.

For example March 2009 - April 2010 or June 2009 - May 2010

I have uploaded a blank Holiday Database so you can see what I mean.

Can anyone help at all?

Shazz
 

Attachments

Last edited:
Why would you want this?
It is much easier practical and much more common to have "normal" jan-dec years and allow per-ratio for new hires.
 
If it was me I'd have a field in the employees table with a year_start number, i.e. Jan is 1 etc. then when specifying date criteria in your query, use something like "month is between "01/" & [year_start] & "/" & year(now()) and dateadd ("m", ([year_start]+11), now()).
You might also want to put a validation rule in the year_start field to say it must be between 1 and 12
 
Why would you want this?
It is much easier practical and much more common to have "normal" jan-dec years and allow per-ratio for new hires.

Yes it would be easier but the company I work for does not have their holidays that way.

If it was me I'd have a field in the employees table with a year_start number, i.e. Jan is 1 etc. then when specifying date criteria in your query, use something like "month is between "01/" & [year_start] & "/" & year(now()) and dateadd ("m", ([year_start]+11), now()).
You might also want to put a validation rule in the year_start field to say it must be between 1 and 12

As I found this database on the web I am not sure how or where to put this information, could you either help me by inputing for me of telling me in simple terms where to put the code, I am very new to all this.

Thanks so much x
 

Users who are viewing this thread

Back
Top Bottom