Query date range problem

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

I have query built on a table. The table has fields as follows:

One date field formatted as "Short Date." - [Date]
Two yes/no fields - [Name1] and [Name2]

The query date field criteria is: Between [start date] and [end date]

The criteria for[Name1] is Yes
No under the Or function

The criteria for[Name2] is No
Yes under the Or function


When I run the query, it does not return the correct number of records
between the entered dates. How do I resolve this???

Any assistance is greatly appreciated.
 
While the date field may be formatted as "Short Date", do it actually
contain time as well as date? If so, try Between [start date] and [end date]
+ 1
 
Doug:
The date does not entail time. Tried your suggestion yet without success.
Thanks for assistance. Any further comments are most welcomed.





Douglas J. Steele said:
While the date field may be formatted as "Short Date", do it actually
contain time as well as date? If so, try Between [start date] and [end
date] + 1


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Frank said:
I have query built on a table. The table has fields as follows:

One date field formatted as "Short Date." - [Date]
Two yes/no fields - [Name1] and [Name2]

The query date field criteria is: Between [start date] and [end date]

The criteria for[Name1] is Yes
No under the Or function

The criteria for[Name2] is No
Yes under the Or function


When I run the query, it does not return the correct number of records
between the entered dates. How do I resolve this???

Any assistance is greatly appreciated.
 
Solved problem.

Had to use the "Between And" expression once in criteria option under the
date field and once in the "or" option under the same date field. This,
then, accounted for Name1 and Name2 fields options.All works as it should
now.

Thanks once again for your assistance.
 
Back
Top