records for last 6 months

N

NAS

What is a good way to filter a query so it only displays records for the last
6 months
? What I have now in the criteria is <=Date()-182. Is there an easier way to
do this? I keep getting an error saying inconsistent datatypes. I'm pretty
new to access so any help would be greatly appreciated.
 
J

Jeff Boyce

Take a look at Access HELP for the syntax on the DateDiff() function. You
don't need to use a number of days in that one -- you can use 6 "months".

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

Jackie L

Jeff's suggestion is good but I am wondering if your data is not a date/time
field if you are getting that error.

Make sure your data is not text or the operator could enter something other
than a date in that field.

Jackie
 
J

Jeff Boyce

Nice catch!

Jeff B.
Jackie L said:
Jeff's suggestion is good but I am wondering if your data is not a
date/time
field if you are getting that error.

Make sure your data is not text or the operator could enter something
other
than a date in that field.

Jackie
 

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

Top