I have a form on which I capture a User's ID and timestamp when a record is entered. However, sometimes another user will look at the record (before it is worked on), and that info gets recorded. I don't want that situation. So I put a Dirty criteria on the code. The thought is that the info will only be captured if it was the first time the record was actually worked on (not viewed):
If IsNull(Me.DateInvoiceInDTU) And Me.Dirty = False Then
Me.DateInvoiceInDTU = Now()
Me.UserLoggedInvoice = GetUserCredentials(2)
Me.text2 = Me.ActiveControl.Name
This code works, in that the Date is not recorded, and the text2 field is not recorded. However, the UserLoggedInvoice is recorded. Any suggestions?