Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Track the Username when a record is changed HELP!!

Discussion in 'Information Technology' started by ScubaDee, Jul 28, 2006.

  1. ScubaDee

    ScubaDee
    Expand Collapse
    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??
     
  2. Loading...


  3. G. Vaught

    G. Vaught
    Expand Collapse
    Guest

    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.
    "ScubaDee" <ScubaDee@discussions.microsoft.com> wrote in message
    news:229CBB34-5194-49D3-85FD-5EECE404D413@microsoft.com...
    > 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??
     
  4. Arvin Meyer [MVP]

    Arvin Meyer [MVP]
    Expand Collapse
    Guest

    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" <ScubaDee@discussions.microsoft.com> wrote in message
    news:229CBB34-5194-49D3-85FD-5EECE404D413@microsoft.com...
    > 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??
     

Share This Page