Aug 23, 2001 #1 jfischer Programmer May 24, 2001 343 US Try the following code in your form: Code: Private Sub Form_BeforeInsert(Cancel As Integer) Me!UserID = CurrentUser End Sub
Try the following code in your form: Code: Private Sub Form_BeforeInsert(Cancel As Integer) Me!UserID = CurrentUser End Sub
Aug 23, 2001 #2 Aivars Programmer May 4, 2001 687 LV Better is: Private Sub Form_BeforeUpdate(Cancel As Integer) Me!UserID = CurrentUser End Sub In such case user who updates data each time will be registered Aivars Upvote 0 Downvote
Better is: Private Sub Form_BeforeUpdate(Cancel As Integer) Me!UserID = CurrentUser End Sub In such case user who updates data each time will be registered Aivars
Aug 23, 2001 Thread starter #3 jfischer Programmer May 24, 2001 343 US Thanks, but matpj had requested that updates NOT overwrite the original record. Upvote 0 Downvote
Aug 23, 2001 #4 JoeMiller IS-IT--Management Apr 27, 2001 1,634 US Use the before update, but only add the record when it's a new record by testing the Dirty property of the form: If Me.Dirty = True Then Me!UserID = CurrentUser End If HTH Joe Miller joe.miller@flotech.net Upvote 0 Downvote
Use the before update, but only add the record when it's a new record by testing the Dirty property of the form: If Me.Dirty = True Then Me!UserID = CurrentUser End If HTH Joe Miller joe.miller@flotech.net
Aug 23, 2001 #5 JoeMiller IS-IT--Management Apr 27, 2001 1,634 US I'm sorry I messed up!! Use the NewRecord property of the form NOT dirty. If Me.NewRecord = True Then Me!UserID = CurrentUser End If HTH Joe Miller joe.miller@flotech.net Upvote 0 Downvote
I'm sorry I messed up!! Use the NewRecord property of the form NOT dirty. If Me.NewRecord = True Then Me!UserID = CurrentUser End If HTH Joe Miller joe.miller@flotech.net