Date to default to January 1

davidbodhi

Davidbodhi
Local time
Today, 07:04
Joined
Jul 6, 2005
Messages
79
I have a little application that includes information about insurance deductables.

Deductables revert to their maximum on a date set by the insurance company, but that is USUALLY January 1.

So, for the control on the form where a new patient is set up, I have a date field where that "revert" date is to be entered.

Since it's usually January 1, I want a default to appear of January 1, of whatever the current year is. I've been looking through the Access help screens as well as this and other forums and have not found anything to suggest how to go about this.

Not being trained as a programmer, I'm coming here asking for some help.

Can anyone give me the appropriate code to generate the default date I want?
 
Use the DateSerial() function: DateSerial(Year(Date),1,1)
 
And, carrying on from Rural Guy's post, you can actually do this without code using the textbox's Default Value property:

DateSerial(Year(Now()),1,1)

Regards,
Tim
 

Users who are viewing this thread

Back
Top Bottom