Update UserID and Default Date - Continuous Form

  • Thread starter Thread starter Jani
  • Start date Start date
J

Jani

On a continuous form, I have a field for the UserID (code coutesy of Dev
Ashish - fosUser) and a field for the default date which when one enters a
new record, works... amazingly for me! But when an update to a record is made
by a different user, I need to update the UserID and default date. I was
using an update query but it updates all the records, not just the one that
was changed. Can anyone assist me? Thanks! Jani
 
Put code in the form's BeforeUpdate event to set the fields.

Private Sub Form_BeforeUpdate(Cancel As Integer)

Me!UserID = fOSUser()
Me!UserDate = Now()

End Sub
 
Back
Top