Results 1 to 7 of 7
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Get Username (Access 97)

    I am trying to get the Username of the person working on this form. But all I get is ADMIN. What am I doing wrong?

    Private Sub Form_BeforeUpdate(Cancel As Integer)
    If IsNull(Me!stats1) Then
    Me!stats1 = Now
    Me!b = CurrentUser()
    ElseIf IsNull(Me!stats2) Then
    Me!stats2 = Now
    Me!User2 = CurrentUser()
    ElseIf IsNull(Me!stats3) Then
    Me!stats3 = Now
    Me!User3 = CurrentUser()
    End If
    End Function

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Get Username (Access 97)

    Try a search for GetUser in the lounge's threads

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get Username (Access 97)

    Have a look at this thread
    Francois

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Get Username (Access 97)

    The other responses give you an indication of what needs to be done, but the important thing is that you must setup the different users in the security menu, and then each of the workstations needs to point to the system.mdw file where the users were created. Otherwise, they use their local system.mdw file and never get a login prompt because Admin is the default when there is no password. The threads you were pointed to go into more detail about how all this works.
    Wendell

  5. #5
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get Username (Access 97)

    What and were is the security menu and what and where is system.mdw? These are greek to me. I just though it was very simple. I did find the system.mdw in my c: drive but I don't think you mean that one.

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Get Username (Access 97)

    That is the system.mdw Wendell was referring to. Your best bet is to create a new MDW file (with a different name) by using the workgroup administrator (wrkgadm.exe) and creating your permissions using that MDW. That way, you can join the default system.mdw for other databases to avoid having to log into all of them.
    Charlotte

  7. #7
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Get Username (Access 97)

    In addition to Charlotte's comments, I would suggest you visit the Microsoft Knowledge base and look at the security documents identified in this <!post=this post,67369>this post<!/post>, and you might also want to visit this knowledge base article that is more recent.:
    http://support.microsoft.com/support/acces...tent/secfaq.asp

    You will also need to know about the Microsoft Access Workgroup Manager - in 97 it should be found in the Office directory.http://link
    Wendell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •