Last Modified Date

chellebell1689

Registered User.
Local time
Yesterday, 21:32
Joined
Mar 23, 2015
Messages
267
Hello,

I was wondering how do I set up a field so that when the record has been modified, the field is automatically filled in (or replaced) with a date? In other words if I open up my member's detail form, and go to Sally Smith and edit her information on 11 July 15, that date is saved into a field called last modified and then updated every time I go into her file and edit & save it.

Thanks in advance and let me know if you need more info.
 
So, in Access you can't do this at the table level, so you can't guarantee it will occur. If someone opens the table directly, or some later developer writes a new process that does an edit, you can't guarantee this update will occur.

In am Access.Form, however, you can handle the Form_BeforeUpdate event and run code at that time.
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
    Me.Modified = Now()
End Sub
hth
 
Ok I'll try that thanks!
 

Users who are viewing this thread

Back
Top Bottom