Solved

Access Report need Month and Year for Previous Month.

Posted on 2014-03-28
9
819 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 35

Expert Comment

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

Author Comment

by:Mwvarner
ID: 39962023
Perfect
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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
 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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)…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

856 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