From: mattc66 via AccessMonster.com on
I have a date field that I want to filter based on a date. However the date
contains the date and time. I want to allow the user to enter the date to
filter the date. When we enter the date in the criteria - it comes up with no
records. However there is data when not filtered. What can I do?

--
Matt Campbell
mattc (at) saunatec [dot] com

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201003/1

From: John W. Vinson on
On Tue, 09 Mar 2010 21:55:53 GMT, "mattc66 via AccessMonster.com" <u16013(a)uwe>
wrote:

>I have a date field that I want to filter based on a date. However the date
>contains the date and time. I want to allow the user to enter the date to
>filter the date. When we enter the date in the criteria - it comes up with no
>records. However there is data when not filtered. What can I do?

Use a criterion of

>= [date criterion] AND < DateAdd("d", 1, [date criterion])

to get all records from midnight at the start of the requested date through
11:59:59.99999pm the next night.
--

John W. Vinson [MVP]
From: KARL DEWEY on
Use a calculated field where you strip the time off like this --
Date_Only: DateValue([YourDateField])

Then apply criteria to that field.

--
Build a little, test a little.


"mattc66 via AccessMonster.com" wrote:

> I have a date field that I want to filter based on a date. However the date
> contains the date and time. I want to allow the user to enter the date to
> filter the date. When we enter the date in the criteria - it comes up with no
> records. However there is data when not filtered. What can I do?
>
> --
> Matt Campbell
> mattc (at) saunatec [dot] com
>
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201003/1
>
> .
>