HELP NEEDED NOW!!! CurrentUser Function

  • Thread starter Thread starter SandyDu
  • Start date Start date
S

SandyDu

Guest
I hope someone will be able to help me soon. I'm on a tight development schedule. I need to know the easiest way to log the CurrentUser, Current Form opened, and the Date and time (which I know is Now()) into a table each time someone opens a form. I've tried various ways with no luck. I'm sure it's simple, but it's taking me too much time to figure out.
 
Check out this site: http://www.mvps.org/access/general/gen0034.htm
There's some info on how to get the currently logged on user.
You would have to put code in each of the form you want to perform auditing on in the opne event procedure

e.g.
Private Sub Form_Open()
With rstAuditFormOpen Do
.addnew
!CurrentUser = GetCurrentUser
!CurrentForm = Me.Name
!DateOpened = Now()
.Update
End With
...
End Sub

When the app is opened you wil lwant to open a recordset based on your audit table. Leave this open until the app is closed, because you don't want to be opening and closing the same recordset each time the user opens a form.

HTH
ntp
 

Users who are viewing this thread

Back
Top Bottom