Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / April 2008

Tip: Looking for answers? Try searching our database.

Move back a month

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lime - 17 Apr 2008 17:46 GMT
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?
akphidelt - 17 Apr 2008 17:56 GMT
Just add a - 1 to the end of it.

Month: Month(Date())-1

> 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?
Klatuu - 17 Apr 2008 20:00 GMT
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
Signature

Dave Hargis, Microsoft Access MVP

> Just add a - 1 to the end of it.
>
[quoted text clipped - 3 lines]
> > 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?
John W. Vinson/MVP - 18 Apr 2008 02:32 GMT
>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")
Lime - 18 Apr 2008 04:29 GMT
Hello,
Thank you... Very Helpful.

> >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
[quoted text clipped - 5 lines]
>
> ShowMonth: Format(DateAdd("m", -1, Date()), "mmmm")
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.