I can get the current date with this:
Dim dtDate As Date
dtDate = Format(Date, "mm/dd/yy")
Is there a constant for months? I mean is there I way I can convert this code to the month at the time the code is run? I have a report that I want to filter by the current month. So if the code was run now I would only get the records for march.
This is the code I am workin on:
DoCmd.OpenReport "EmpContactLog", acViewPreview, , "[Month] = '" & strMonth & "'"
Dim dtDate As Date
dtDate = Format(Date, "mm/dd/yy")
Is there a constant for months? I mean is there I way I can convert this code to the month at the time the code is run? I have a report that I want to filter by the current month. So if the code was run now I would only get the records for march.
This is the code I am workin on:
DoCmd.OpenReport "EmpContactLog", acViewPreview, , "[Month] = '" & strMonth & "'"