I need to add a piece of criteria to a report.
It needs to say:
if datepurchased = 1st of next month then ......
Thank you for your help.
Rachel
Printable View
I need to add a piece of criteria to a report.
It needs to say:
if datepurchased = 1st of next month then ......
Thank you for your help.
Rachel
Use the DAY() function
Code:if Day(myDate)=1 then msgbox "First of the Month"
This report can be ran on any day, I need to know how to - for example:
its the 15th of may and I run this report, i need all records that the datepurchased is = the the first of the following month (april).
So, i would need the first of next month.
Rachel
You can get the current day and also the current month. Add 1 to the month, using DateAdd(), then get the first day to use in the sql statement.
Look in the help at DateSerial.
DateSerial(Year(d), Month(d) + 1, 1)
Thank you... I will check into it, at a quick glance i think that will work...
:) :) :)