K
kimb via AccessMonster.com
I have a query that contains a Date/Time field. I am currently using a
between statement to get the results I am looking for.
Between #7/16/2009 6:00:00 PM# And #7/17/2009 1:00:00 PM#
Between #7/16/2009 4:00:00 PM# And #7/17/2009 1:00:00 PM#
(There are other criteria in the query, which is why there are more than one
between statement. There are actually 4 between statements, but for what I'm
asking I don't think it is necessary to post all of the criteria.)
Every day the person who runs this query has to go into the design view of
the query and change the dates (the times stay the same). I am trying to
avoid anyone going into the design view. I would like for a box to pop up and
say "Enter Yesterday's Date", and then "Enter Today's Date". I have tried
seperating the date and the time and putting them into their own fields.
However, when I go to search by time, instead of removing from 6:00pm
yesterday to 1:00pm today, it removes from 1pm to 6pm for all days. Since I
am eliminating data based on times, the times have to be connected to the
dates. Does anyone have any ideas as to how I could achieve this, or is it
even possible?
Thanks for your time!
between statement to get the results I am looking for.
Between #7/16/2009 6:00:00 PM# And #7/17/2009 1:00:00 PM#
Between #7/16/2009 4:00:00 PM# And #7/17/2009 1:00:00 PM#
(There are other criteria in the query, which is why there are more than one
between statement. There are actually 4 between statements, but for what I'm
asking I don't think it is necessary to post all of the criteria.)
Every day the person who runs this query has to go into the design view of
the query and change the dates (the times stay the same). I am trying to
avoid anyone going into the design view. I would like for a box to pop up and
say "Enter Yesterday's Date", and then "Enter Today's Date". I have tried
seperating the date and the time and putting them into their own fields.
However, when I go to search by time, instead of removing from 6:00pm
yesterday to 1:00pm today, it removes from 1pm to 6pm for all days. Since I
am eliminating data based on times, the times have to be connected to the
dates. Does anyone have any ideas as to how I could achieve this, or is it
even possible?
Thanks for your time!