Date default in Access subform ?


I have developed a ms-access form and subform. In the subform there is date field. I want to default this date field to today’s date. How can I achieve that ? Also once a record is entered I don’t want that field to change again.

Meaning if I am entering record on 15-08-2013 then date should default to 15-08-2013. But once record is saved that field should always remain 15-08-2013. If I open it today it should not change to 27-08-2013.

Is this possible ?


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You should be able to do that in the table itself, not the form/s.

Add =Now() for the Default Value for that field in your table. The Default Value is the value entered into that field for new records.

In your subform, set the textbox which shows the date to Locked (yes) and then the date will not be able to be updated from the form.
Kelvin SparksCommented:
I agree with the above - if you don't want the time component of the datetime value -0 us Date() for the default Value

Kelvin SparksCommented:
With typos fixed

I agree with the above - if you don't want the time component of the datetime value use
Date() for the default Value


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
No typo, =Now() works as the default value field property.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.