Microsoft Access query help

I need this query to give me animals 4 months and older.

SELECT SoftSlips.SoftSlip, Breeds.Breed, Species.Species, SoftSlips.Sex, SoftSlips.Action, SoftSlips.DOB
FROM Species INNER JOIN (Breeds INNER JOIN SoftSlips ON Breeds.BreedID = SoftSlips.BreedID) ON Species.SpeciesID = SoftSlips.SpeciesID
WHERE (((Species.Species)="cat" Or (Species.Species)="dog") AND ((SoftSlips.Action) Is Null) AND ((SoftSlips.DOB)<=DateAdd("m",-2,Date())))
ORDER BY SoftSlips.SoftSlip, SoftSlips.DOB DESC;
J.R. SitmanIT DirectorAsked:
Who is Participating?
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
change "-2" on this part

AND ((SoftSlips.DOB)<=DateAdd("m",-2,Date())))

with -4

AND ((SoftSlips.DOB)<=DateAdd("m",-4,Date())))
AccessGuy1763Connect With a Mentor Commented:
I don't see any reason why your query wouldn't work as you have it constructed.  The only necessary change I see is to change to "-2" parameter of your DateAdd() function to "-4".
J.R. SitmanIT DirectorAuthor Commented:
I'm confused on what I was doing.  One of those days I guess.  Brain fart.  :-)
Thanks to both.  It works
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.