AutoUpdate Fields

D

Don

I am kind of new to Access. I have created an Inventory
Tracking database and have a questions. I want to have a
ModifyDate field that shows the last time a change was
made to data within the form. How can I have it update
this field with the current date automatically without the
user filling it out itself? Thank you.
 
A

Allen Browne

Use the BeforeUpdate event procedure of the form to assign the current date
to the field:

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.ModifyDate = Date
End Sub
 
D

Don

SWEET! Thank you for the quick response!

Don

-----Original Message-----
Use the BeforeUpdate event procedure of the form to assign the current date
to the field:

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.ModifyDate = Date
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top