Date and Time Table Modified

  • Thread starter Thread starter Golfinray
  • Start date Start date
G

Golfinray

I have 4 forms used by managers to enter data. When they enter data, the data
is saved in tables. I would like to include a date and time stamp so that I
know when they entered each piece of new data. Do I need to have a field in
my table to collect the date and time? How do I collect that in my form?
Thanks!!
 
Yes, you need to add a field to your table.

In the form's BeforeUpdate event, put code to update that field. Assuming
that you named the field LastUpdated and that you included the field in the
form's RecordSource, the code would look something like:

Private Sub Form_BeforeUpdate(Cancel As Integer)

Me.LastUpdated = Now()

End Sub
 

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

Back
Top