Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2008
    Posts
    2

    Question Unanswered: Challenge for you Security Experts - Change logged-in user without restart

    I thought I was pretty knowledgeable about Access security, but I am stumped by this one.

    I need to be able to programmatically change the current user without having to close the app or the login screen appearring for a manual login.
    It needs to just change from one use to another.

    But I can't even find where CurrentUser() pulls its data much less how to change the current user. I know I can force it to join a new workgroup, but that just pops up the login screen.

    Any ideas?

  2. #2
    Join Date
    Nov 2008
    Posts
    2
    I just found a reference that says this is impossible. That the app must be closed then re-opened to accomplish this.
    So there is my answer, back to the drawing board.

  3. #3
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    This does exactly what you want....

    http://www.dbforums.com/showpost.php...9&postcount=68

    but you'll need to modify it to fit the needs of your program (ie. which buttons to enable/lock). But it will not change the value of CurrentUser. It will change the value in the table used for security permissions.
    Last edited by pkstormy; 11-17-08 at 22:04.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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