?
Solved

Access Report need Month and Year for Previous Month.

Posted on 2014-03-28
9
Medium Priority
?
851 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 1500 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

771 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