Auto Date Fillin

T

Tony

Does anyone know if it's possible to have the current date fillin a field if
a certain button is pressed? Example, I have a database where I have a date
last updated field and I wanted that if they press the EDIT button to change
anything in the record that it automatically fills in the date updated field
in with the current date. Thanks for any help!!
 
R

Rick B

You could do that, but the normal way to do this is to have the system
change the "last update" field any time the record is changed. This happens
whether the user wants it to or not. Your method seems to require them to
press a button.

If it were me, I'd simply put code in the Form's BEFORE UPDATE event. If
you have your users logging in to the system with User-level security, you
could even include the userid that made the change. The code would look
like...

TimestampField=CurrentUser() & " " & Now()



Of course, you'll want to make sure the user cannot get to that field. It
needs to be locked and/or disabled.
 
Top