I want to select everything in [Date Closed] with a date in the prior month. This would work for the month portion, but I'm having trouble deciding how to handle the year portion.
I don't want all records for Oct in every year, just the current year, and since I'm looking for the prior month, running this in January would cause a problem with grabbing the prior year.
SELECT * FROM qryAdHoc WHERE (((Month([Date Closed]))=Format(Now(),"mm")-1));
Anyone have any ideas?
Thanks,
Randy
I don't want all records for Oct in every year, just the current year, and since I'm looking for the prior month, running this in January would cause a problem with grabbing the prior year.
SELECT * FROM qryAdHoc WHERE (((Month([Date Closed]))=Format(Now(),"mm")-1));
Anyone have any ideas?
Thanks,
Randy