Solved

Access Report need Month and Year for Previous Month.

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Office 365 home questions 7 65
Access Date/Time to SQL Datetime2(7) 9 25
A Function to parse a text string 4 35
User Level Security 6 38
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

770 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