I have created two tables in which I want to track who and what time data is entered and then again if the table is modified. I found this code which I added to BeforeUpdate:
Private Sub Form_BeforeUpdate(Cancel As Integer)
ModBy = Environ("username")
ModDate = Now()
End Sub
Private Sub Form_Current()
If Me.NewRecord Then
CreateBy = Environ("username")
End If
End Sub
So I went in and tested the code and it did put in the date but now my username. Do I need to created a table of users and then make the database password driven. Also this is a split database.
Just to let you know I know enough to be dangerous!
Private Sub Form_BeforeUpdate(Cancel As Integer)
ModBy = Environ("username")
ModDate = Now()
End Sub
Private Sub Form_Current()
If Me.NewRecord Then
CreateBy = Environ("username")
End If
End Sub
So I went in and tested the code and it did put in the date but now my username. Do I need to created a table of users and then make the database password driven. Also this is a split database.
Just to let you know I know enough to be dangerous!