Move back a month

  • Thread starter Thread starter Lime
  • Start date Start date
L

Lime

I a query I have an experssion Field: Month: Month(Data() and it populates
the table with four... Thats good, but I need it to display March. Alway
going back a month as this is when the data was pulled. Any hints?
 
Three problems,
1. Never use an Access reserved word as a name.
2. The OP wants 15 days, not a month
3. That will do no filtering as written
 
Lime said:
I a query I have an experssion Field: Month: Month(Data() and it populates
the table with four... Thats good, but I need it to display March. Alway
going back a month as this is when the data was pulled. Any hints?

\Don't use the reserved word Month as a fieldname, for starters. If you want
to display the text string "March" for any date in April, or "December" for
any date in January, use

ShowMonth: Format(DateAdd("m", -1, Date()), "mmmm")
 
Hello,
Thank you... Very Helpful.

John W. Vinson/MVP said:
\Don't use the reserved word Month as a fieldname, for starters. If you want
to display the text string "March" for any date in April, or "December" for
any date in January, use

ShowMonth: Format(DateAdd("m", -1, Date()), "mmmm")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top