Date stuff

T

T.

Hello everyone,

I need to write a query that looks at the current date's month and pulls all
records where the field PossessionDate is in the next month.

I have been able to pull the value of the months when I pull records from a
date range using DatePart, but have not been able to get it to do what I
need.

Can anyone help me out??

TIA,

T.
 
B

Brian Camire

You might try setting the criteria for your PossessionDate field in query
design view to something like:
=DateSerial(Year(Date()), Month(Date()) + 1, 1) And
<DateSerial(Year(Date()), Month(Date()) + 2, 1)
 
T

T.

Thanks much for the suggestion, I just got it going before you posted I
added a calculated field of::

DatePart("m",[PossessionDate]) with criteria = (DatePart("m",Date())+1)

Thanks again!

T.
 

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