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!

date field of last change

Status
Not open for further replies.

delpino

Programmer
Dec 29, 2000
17
GB
Hello,

i am looking for a date field in access which automatically updates itself to the last change of the record.
 
I don't think that there is a 'ready made ' way of doing this in access, but there is a fairly simple solution.
In the form that you use to update the data, you will need to attach a bit of code to the text fields that will you use to make the updates. You will want to use the "ONUpdate" property of each of the text boxes.
It should look something like this for each of your text boxes or comboboxes. (In this case I used "UpdatedDate" as my new field name for storing the dates that you want to record.)

Private Sub Combo88_AfterUpdate()
Me!UpdatedDate.Value = Now()
End Sub

Basically, what you want to do is send the current date to the update field anytime someone tries to update the record. If they change anything in the field, it automatically moves the current date into the update field to be stored.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top