How would I do this?

  • Thread starter Thread starter Marc
  • Start date Start date
M

Marc

I'm doing a query to find people who are currently on travel. I have a field
of "Date Started" and one for "Date Returning." Where in the query and how
would I determine if today is between those dates?
 
Marc

One approach might be to use something like the (untested) following:

under the [DateStarted], as a criterion --
<=Date()

under the [DateReturning], as a criterion --

That should find records with start dates on/before today's date, and end
dates on or after today's date.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
I'm doing a query to find people who are currently on travel. I have a field
of "Date Started" and one for "Date Returning." Where in the query and how
would I determine if today is between those dates?

I expect you have entered a DateStarted and a future DateReturning
value when they leave.
It doesn't matter if today is 'between' those dates, only that it is
not yet the DateReturning.

As criteria on the DateReturning field (in a query):
Date() or perhaps if you wish
=Date()

How does your database handle someone who was scheduled back on 7/3
but actually came back on 6/29? According to your current database
design, they're not here but yet they are.
 
I'm doing a query to find people who are currently on travel. I have a field
of "Date Started" and one for "Date Returning." Where in the query and how
would I determine if today is between those dates?

Put a criterion of

<= Date()

on [Date Started], and

on [Date Returning].
 
Back
Top