Track the Username when a record is changed HELP!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

On the before update event procedure of the form I have written the following:

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.[EditDateTime] = Now()
Me.[Edit_USERID] = CurrentUser()

End Sub

The problem is the USERNAME is ALWAYS "Admin", this occurs on my PC at home
and on the network and it is driving me CRAZY!!

The Options in Access are correct and have my name as the User Name.

Can someone please help me out here??
 
Admin is the default for Access if no user level security has been set.
Until you set this then you won't be able to do what you want.
 
Perhaps you would do better by grabbing and using the Windows username:

http://www.mvps.org/access/api/api0008.htm
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

ScubaDee said:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.[EditDateTime] = Now()
Me.[Edit_USERID] = CurrentUser()

End Sub

The problem is the USERNAME is ALWAYS "Admin", this occurs on my PC at home
and on the network and it is driving me CRAZY!!

The Options in Access are correct and have my name as the User Name.

Can someone please help me out here??
 
Back
Top