Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On a form I want the date field to defualt in todays date but..

Status
Not open for further replies.

torf66

Programmer
Jun 10, 2003
43
US
I want on a form to default in today's date when I first enter the record, but when I come into that same record tomorrow to edit the record I want the date in this field to then stay as yesterdays date not update again with today's date. For example I enter a new record today and the field I have is dtminitiatedate. When I open my form this field is populated with today's date 06/24/2003. Then
tomorrow 06/25/2003 I update some other fields in this same record I want dtminitiatedate to still have 06/24/2003. Is there a way to set that on my field in the form?
Thanks,
Todd 701-364-6183
 
You must have an assignment of that field to Date(). If its in code somewhere (like OnOpen or OnCurrent, remove that. If its in the fields Control Source property, remove that.

Set the field's "Default" property to

=Date()

The default value is assigned for new records, and does not subsequently change the value of that field.

Of course, if you had the field's Control Source set to =Date(), then you'll need to set it's Control Source to a field in your table that stores the date.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top