IMPROPER RESULTS IN A QUERY

E

ED C

=[forms]![searchdialogdate]![BeginningDate] And
<=[forms]![searchdialogdate]![EndingDate]
EX 04/01/2007 TO 04/30/2007
I AM GETTING A RESULT THAT IS NOT INCLUDING 4/30/2007
 
D

Douglas J. Steele

I'm guessing that the field you're querying has both date and time in it (it
was probably populated using the Now function).

In that case, use

<= DateAdd("d", 1, [forms]![searchdialogdate]![EndingDate])

Note that it might be necessary to use

<= DateAdd("d", 1, CDate([forms]![searchdialogdate]![EndingDate]))


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


ED C said:
=[forms]![searchdialogdate]![BeginningDate] And
<=[forms]![searchdialogdate]![EndingDate]
EX 04/01/2007 TO 04/30/2007
I AM GETTING A RESULT THAT IS NOT INCLUDING 4/30/2007
 
E

ED C

I WOULD LIKE TO THANK YOU FOR THIS FINE ANSWER AND IT DID RESOLVE MY ISSUE.
and yes i was populating the date field with the NOW() function and then
using code to increase or decrease the date i needed.

Douglas J. Steele said:
I'm guessing that the field you're querying has both date and time in it (it
was probably populated using the Now function).

In that case, use

<= DateAdd("d", 1, [forms]![searchdialogdate]![EndingDate])

Note that it might be necessary to use

<= DateAdd("d", 1, CDate([forms]![searchdialogdate]![EndingDate]))


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


ED C said:
=[forms]![searchdialogdate]![BeginningDate] And
<=[forms]![searchdialogdate]![EndingDate]
EX 04/01/2007 TO 04/30/2007
I AM GETTING A RESULT THAT IS NOT INCLUDING 4/30/2007
 
Top