Solved

Access Report need Month and Year for Previous Month.

Posted on 2014-03-28
9
775 Views
Last Modified: 2014-04-07
I am working on an Access 2013 report and I need to show the month and year for the previous month on the report formatted like this "Feb 14" for February 2014.
0
Comment
Question by:Mwvarner
  • 4
  • 3
9 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 39962006
This would do it:

format(dateadd("m", -1, now), "mmm yy")

So if you want a Textbox to show that, set the Source to this:

=format(dateadd("m", -1, now), "mmm yy")
0
 
LVL 34

Expert Comment

by:PatHartman
ID: 39962015
Format(dateadd("m",-1,Date()), "mmm yyyy")
0
 

Author Comment

by:Mwvarner
ID: 39962023
Perfect
0
 
LVL 84
ID: 39962130
Hmmm ... my comment was first, and it formats the Year correctly as "14" instead of "2014", so I'm curious why you chose Pat's answer.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:Mwvarner
ID: 39962142
I'm sorry about that.  I had already figured it out by the time either of you had responded.  I was reading the answer on my phone and didn't see your response.  I saw Pat's answer was almost exactly what I did so I accepted it.

Marshall
0
 
LVL 84
ID: 39962416
Generally you accept the first comment which is correct. I'll ask the Moderators for a review.
0
 

Author Comment

by:Mwvarner
ID: 39962426
That's fine with me.  I accept either answer or both and split the points.
0
 

Author Closing Comment

by:Mwvarner
ID: 39984437
Thanks for the help.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now