Inserting Date On Enter

esurfer

Registered User.
Local time
Today, 19:01
Joined
Jan 29, 2002
Messages
12
This has got to be simple but I can't get it to work. I have a "Date_Modified" field that I want to be updated with the current date when I double click on the field in the form. (Not On Enter as my title suggests, my mistake) I added the expression =Date() to the text box Event "On Dbl Click" but that is not working. What am I doing wrong?

Thanks,
esurfer

[This message has been edited by esurfer (edited 01-29-2002).]
 
Are you wanting to capture the Modified Date when ANY changes are made to the data? Or simply do this double click thing?

Your answer is needed for me to specify which event to tell you to put the code on.
 
Actually, I hadn't realized the former was available. So perhaps if you could inform me on both ways, but my original query was just to insert the current date upon double clicking.

Thanks

esurfer

[This message has been edited by esurfer (edited 01-29-2002).]
 
OK.

Option 1: When record is modified

Put code on the BeforeUpdate event of the form.


Me.Mod_Date = date()


Option 2: Double Click

Put code on the OnDoubleClick event of the Mod_Date field.

Me.Mod_Date = date()


To put the code on, click the little build button next to that event on the properties. DO NOT type it right on the line next to the name of the event. Choose Code Builder and insert the code between the lines that show.

Let me know how it turns out.
 

Users who are viewing this thread

Back
Top Bottom