Please tell me this is possible.

  • Thread starter Thread starter Lori
  • Start date Start date
L

Lori

I have a calendar set up so that users can input individual dates that they
are taking off for vacation, sick, etc. My question is, is there a way for a
query to look at a range of dates (example Vacation 6/1, 6/2 and 6/3) and
output Vacation 6/1 thru 6/3?
 
I have a calendar set up so that users can input individual dates that they
are taking off for vacation, sick, etc.  My question is, is there a wayfor a
query to look at a range of dates (example Vacation 6/1, 6/2 and 6/3) and
output Vacation 6/1 thru 6/3?

Sure. Use the Between operator in your criteria
Between #6/1/08# And #6/3/08#
Make sure you are use date field types.

Or a combination of > < = ........
 
Wouldn't that only work if I knew the exact dates? The dates being entered
are for the entire calendar year and not all of them are sequential. If I
have a user who has taken off a sick day on 2/15, and a vacation day on 3/19
followed by vacation on 6/1, 6/2 and 6/3, I need a report that will show me
the individual days of 2/15 and 3/19 as well as group the 6/1 thru 6/3.
 
So if the employee input
6/1 Vacation
6/2 Vacation
6/3 Vacation
6/6 Vacation
6/7 Vacation
6/10 Sick
6/13 Sick
6/14 Sick

You would want the query to return (for that employee)
Vacation 6/1 to 6/3
Vacation 6/6 to 6/7
Sick 6/10
Sick 6/13 to 6/14

I'm pretty sure it can be done. However, I'm not sure how to do it. And
before anyone tackles it, I think they would like to confirm exactly what you
want returned.

For instance, lets say that 6/4 and 6/5 are Saturday and Sunday and 6/11 and
6/12 are also weekend days. Does that mean your results should be
Vacation 6/1 to 6/7
Sick 6/10 to 6/14



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
Actually weekends don't matter because I can always have the query subtract
out the weekends for my totals of days taken. But yes, That would be perfect.
As an example, right now my database shows I took vacation from 6/2 thru
6/6/08 and from 6/9 thru 6/13/08. The data is just as accurate if it says 6/2
thru 6/13 (I subtract out the weekend in my query and it come up with 10 days
vacation used).

Does this make sense?
 

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

Back
Top