Results 1 to 4 of 4
  1. #1
    templeowls is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    305

    Field to show next month along with year

    I'm using this code in a textbox in a report to show the current month and year:

    Code:
    =Format(Now(),"mmmm yyyy")
    I need another field which shows the next month and year (i.e. it would show May 2023 as of today).

    I'm not sure how to do this, particularly regarding end of year. I know how to strictly show the next month but I worry in December 2023, it'll show January 2023 because the year needs to change too.

    Suggestions?

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    use the dateadd function to add 1 month to today - so a December 2023 date + 1 month will show January 2024

    https://support.microsoft.com/en-us/...4-61e8c57afc19

  3. #3
    templeowls is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    305
    Gotcha. Thank you. So I tried the below, but it's appearing as "5/1/2023". I want it to show "May 2023"

    Code:
    =DateAdd("m",1,Format(Date(),"mmmm yyyy"))
    Any suggestions?

  4. #4
    templeowls is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    305
    I figured it out! I had to swap the date add and format. Thank you!!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 21
    Last Post: 01-06-2021, 01:44 PM
  2. Replies: 4
    Last Post: 07-13-2015, 02:06 PM
  3. Replies: 4
    Last Post: 05-26-2013, 03:28 PM
  4. show records in this month last year?
    By geoffcox in forum Queries
    Replies: 4
    Last Post: 06-11-2011, 07:12 AM
  5. Replies: 2
    Last Post: 03-26-2011, 02:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums