dibblermail
Member
- Local time
- Today, 00:28
- Joined
- Jan 10, 2025
- Messages
- 55
I'm still quite new to Access & I've hit what seems to be a formatting issue. I've trawled google but cant find an answer to my exact issue.
I'm trying to fill a text box on a form with todays date using this code.
I'm using .DefaultValue because its a new record which isn't saved yet
If I hover over "Now" in the line of code as it runs I get Now = 24/09/2025 09:23:31
if I go to the immediate window I get...
Debug.Print Format(Now, "yyyy-mm-dd")
2025-09-24
But my textbox is showing 14/06/1905
If I change to the format I actually want to "dd-mm-yyyy" my text box shows 29/06/1894
It's not showing 12/31/1899 so I assume its not a null value
Anyone been here before? It seems like its got to be a simple formatting error somewhere?
I'm trying to fill a text box on a form with todays date using this code.
Code:
Forms!Form0_AddEditJob!TBOX_DateInitial.DefaultValue = Format(Now, "yyyy-mm-dd")
I'm using .DefaultValue because its a new record which isn't saved yet
If I hover over "Now" in the line of code as it runs I get Now = 24/09/2025 09:23:31
if I go to the immediate window I get...
Debug.Print Format(Now, "yyyy-mm-dd")
2025-09-24
But my textbox is showing 14/06/1905
If I change to the format I actually want to "dd-mm-yyyy" my text box shows 29/06/1894
It's not showing 12/31/1899 so I assume its not a null value
Anyone been here before? It seems like its got to be a simple formatting error somewhere?