UGH! Next month Quary?

  • Thread starter Thread starter Justin
  • Start date Start date
J

Justin

I have a database that records files to Closing, and their
funding dates. I need to know a way that I can create a
quary that will sort the records that I already have
logged for funding next month. The current quary that i
have, sorts just for this month. It has

Year([Fund Date])
Year(Now())

Month([Fund Date])
Month(Now())

Really don't care which kind of quary I have to use to get
it to do next month. I tried replacing the Now with Next
or >Now and nothing.. So really could use some help!
Thanks!
 
try

Month(DateAdd("m", 1, Now())

you'll have to change the Year calc also, to

Year(DateAdd("m", 1, Now())

hth
 
Thanks so much! I was trying forever to find a way. Now
I have one additional question, when it comes to the end
of the year like in december and I want to count January's
how will that work?
-----Original Message-----
try

Month(DateAdd("m", 1, Now())

you'll have to change the Year calc also, to

Year(DateAdd("m", 1, Now())

hth


Justin said:
I have a database that records files to Closing, and their
funding dates. I need to know a way that I can create a
quary that will sort the records that I already have
logged for funding next month. The current quary that i
have, sorts just for this month. It has

Year([Fund Date])
Year(Now())

Month([Fund Date])
Month(Now())

Really don't care which kind of quary I have to use to get
it to do next month. I tried replacing the Now with Next
or >Now and nothing.. So really could use some help!
Thanks!


.
 
I have a database that records files to Closing, and their
funding dates. I need to know a way that I can create a
quary that will sort the records that I already have

Jargon alert: "Sort" means "To put selected records in a chosen
sequential order". If you want to search for, or find, or filter, or
query particular records - say so, don't use the term "sort"!
logged for funding next month. The current quary that i
have, sorts just for this month. It has

Year([Fund Date])
Year(Now())

Month([Fund Date])
Month(Now())

BETWEEN DateSerial(Year(Date()), Month(Date()) + 1, 1) AND
DateSerial(Year(Date()), Month(Date()) + 2, 0)

will find all records where the date field lands in the month after
the query is run.
 
Thanks so much! I was trying forever to find a way. Now
I have one additional question, when it comes to the end
of the year like in december and I want to count January's
how will that work?

This will work fine; my DateSerial suggestion in another thread
(sorry, didn't see this one at the time) will work too but it will
take advantage of an Index on the date field.
 
Back
Top