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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autodate

Status
Not open for further replies.

troix

Technical User
Jan 20, 2004
46
US
Okay, this should be easy.

I have a date field. I want it, when clicked, to automatically enter todays date.

Thanks
 
Set the field to

=Date()


__________________________________
Remember that time when I took the box? - Peter
 
In the "On Click" event for the Text Box or whatever your using, add the following code.

Private Sub fieldname_Click()
fieldname.value = Date
End Sub

You can also set the field to =Date(), however I have always been a proponent for using Hard Code instead of the properties sheet.

See Ya
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top