Solved

Access Report need Month and Year for Previous Month.

Posted on 2014-03-28
9
840 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
9 Comments
 
LVL 85

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 38

Expert Comment

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

Author Comment

by:Mwvarner
ID: 39962023
Perfect
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 85
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 85
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

717 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