Access: Date in an unbound field on a form

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,332
Office Version
  1. 365
Platform
  1. Windows
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
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
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",-[COLOR=#0000ff]1[/COLOR],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.
 
Upvote 0

Forum statistics

Threads
1,213,485
Messages
6,113,931
Members
448,533
Latest member
thietbibeboiwasaco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top