IMPROPER RESULTS IN A QUERY

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

=[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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top