From: mattc66 via AccessMonster.com on 9 Mar 2010 16:55 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 9 Mar 2010 17:45 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 9 Mar 2010 18:18 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 > > . >
|
Pages: 1 Prev: Comparison Query - How to write it! Next: Is it possible and how can it be done? |