There are two date fields in my table "date from" and "date to"
The database is used to book visitors into our building
So for example, if mr smith was visiting for the month of June, there
would be one row added to the table with the "date from" being 1st June
and the "date to" being 30th June.
We then run a query daily to pull off the days visitors, using the
following criteria
"date from" "date to"
<=date() >=date()
We also run a query for visitors expected tomorrow with the following
criteria
"date from" "date to"
<=date()+1 >=date()+1
We also get asked to see if a visitor was in the building on certain
days, which is what I am trying to do.
So using mr smith above as an example, i.e. one row in my table for the
month of June, How would I enter my criteria if I wanted to run a query
for say, the 7th to 14th of June.
I tried the criteria below which I thought might work but as usual I was
wrong
"date from" "date to"
<=6/7/06 >=6/14/06
Any help would be very much appreciated
Steve
Joan Wild said:
Hi Steve, it's not clear to me whether you have two date fields or one?
If it's one date field and you want to return all records between two
dates then add your date field to the grid and use
Between [Enter start date] and [Enter end date]
as the criteria.
This will prompt the user for the two dates in the range.
If you have two date fields, please explain in more detail (with perhaps
some sample data) what exactly you want returned.
--
Joan Wild
Microsoft Access MVP
I have 2 date fields on my form
"date from" and "date to"
I have a parameter query setup so I can list by a date
Date From Date To
<=[enter date] >=[enter date]
Not sure how that works but it does (I enter the date when prompted in
the
"date from" box and the query runs showing starting and ending dates
for
every row.
How should I enter the criteria if I want to select a date range. E.g
date
from 1/1/07 to 1/14/07
Many Thanks
Steve