Results 1 to 4 of 4
  1. #1
    Gina Maylone is offline Always learning
    Windows 10 Access 2016
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544

    Current User is incorrect

    Hello! Have a weird problem today, on the main form I have an unbound text box, "User", Control Source is "=CurrentUser()", but it is showing Admin as the current user which is incorrect. The user actually should be "HA4User", I tested it in the immediate window and got Admin. I checked Windows and saw HA4User. Anyone run into this before? I don't even know where to begin. TIA.

  2. #2
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    I take it that CurrentUser() is a function that returns something. It's probably not doing what you think it is. Try stepping through it while you check the variables. If nothing pops up, maybe post the function code. Admin sounds like a level to me, not a user as in user name, so this isn't a case of it returning the wrong field from a table?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Gina Maylone is offline Always learning
    Windows 10 Access 2016
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    Thank you Micron, I changed it to =GetUserName() and it's working now. :-)

  4. #4
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Wunderbar!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 01-09-2017, 07:20 AM
  2. How to Get Current SQL User?
    By altemir in forum SQL Server
    Replies: 1
    Last Post: 05-01-2014, 02:25 PM
  3. Tasks and the current user!
    By WhiskyLima in forum SharePoint
    Replies: 0
    Last Post: 10-23-2013, 04:18 AM
  4. permission & change current user
    By mye887 in forum Access
    Replies: 1
    Last Post: 06-05-2013, 12:25 AM
  5. Selecting based on current user
    By shabbaranks in forum Programming
    Replies: 3
    Last Post: 01-27-2012, 07:07 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums