Thread: Query issue
View Single Post
  #4 (permalink)  
Old June 16th, 2008, 09:54 AM
SerranoG SerranoG is offline
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG

It's hard to tell without seeing your table structure. A couple of comments.

You have

WHERE (((tblfileinspect.caseapr) Is Not Null And (tblfileinspect.caseapr)>1) AND ((tblfileinspect.ffdate) Between Date() And Date()-90))

Well, if you have

tblfileinspect.caseapr > 1

you don't need

tblfileinspect.caseapr Is Not Null

because the first requirement will ensure that the field is not null. Also, you used a BETWEEN in your criterion but your dates are backwards. I wonder what Access will do if your end date is AFTER your start date. Swap those.

tblfileinspect.ffdate Between DateAdd("d", -90, Date()) And Date()

Say, there are balloons and confetti coming off the ceiling. Oh, this is my 1000th post.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Reply With Quote