Link to home
Create AccountLog in
Avatar of baxtalo
baxtalo

asked on

Where Clause problem

Hi Experts,
My where clause used to display records of the previous month. In this new year won't display the December records. This is the error message I get on the page:
"Invalid procedure call or argument: 'MonthName'"
Please take a look at my where clause:

WHERE MonthOfReport LIKE '%" & MonthName(month(now)-1) & "%' AND YearOfReport like '%" & year(DATEADD("m", -1, now))& "%'


Can anyone please help? Thank you...

ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of baxtalo
baxtalo

ASKER

Perfect!
Thank you very much.