YDT - You select month as YTD month (1 Viewer)

mounty76

Registered User.
Local time
Today, 11:11
Joined
Sep 14, 2017
Messages
341
Hello!!

I have a table with over 4000 records, each record as a date of the 1st of each month. This is an annual budget that holds budget data for 5 years for various budget codes.

Does anyone know criteria I can use whereby I can enter a month (say 4 for April) and it will return all records from the 1st Jan of current year until the 1st of April (or whatever month I enter) of the current year.

Thanks in advance!
 

mounty76

Registered User.
Local time
Today, 11:11
Joined
Sep 14, 2017
Messages
341
Perfect, thanks

Between DateSerial(Year(Now()),1,1) And DateSerial(Year(Now()),[Enter Month],1)

I'll get the hang of this one day! LOL
 

Gasman

Enthusiastic Amateur
Local time
Today, 18:11
Joined
Sep 21, 2011
Messages
14,046
You could just use Year(Date) ?
I was thinking more along the lines of you selecting that month, that would also indicate year as well from the table and then use that year value as well?

So if you looked at August last year you would get 01/01/2020 to 01/08/2020 ?
 

mounty76

Registered User.
Local time
Today, 11:11
Joined
Sep 14, 2017
Messages
341
OK thank you, it's working for now, I've got about 3 or 4 queries dependent on each other to drag out the information and then group them into various groups of budget codes and also to take the same actual expenses for the same period and group into the same codes. I've probably over complicated it.....but it works! Live and learn! Thanks again
 

Users who are viewing this thread

Top Bottom