Results 1 to 2 of 2

Thread: Access: Date in an unbound field on a form

  1. #1
    Board Regular gheyman's Avatar
    Join Date
    Nov 2005
    Location
    Orlando, FL USA
    Posts
    1,632
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Access: Date in an unbound field on a form

    I want to add a field on my form that will act as a "Title". Actually I have 6 fields. In the first one, if todays date is in the month of September I want it to say "September" in the field. I would even be OK with the Month and Year (But not the day). In the next box if today is 9/17/2019 I want this second field to say "August" (again August 2019) would be acceptable. And so on for each of the six
    September (or September 2019)
    August
    July
    June
    May
    April

    I am showing data in unbound fields for the last six months, which is why I need these "header". Again this is on a form, not a table or query...

    Thanks for the help
    G Heyman
    Northrop Grumman - Laser Systems'
    Apopka, FL

  2. #2
    MrExcel MVP
    Junior Admin
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    50,794
    Post Thanks / Like
    Mentioned
    57 Post(s)
    Tagged
    11 Thread(s)

    Default Re: Access: Date in an unbound field on a form

    Enter this into the Control Source of the first Text Box:
    Code:
    =Format(Date(),"mmmm")
    which will return current month (September).

    Enter this into the Control Source of the first Text Box:
    Code:
    =Format(DateAdd("m",-1,Date()),"mmmm")
    which will return prior month (August).

    Then, just change the number in blue to 2, 3, 4, and 5 for the other four months, respectively.
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •