putting username in a msgbox

  • Thread starter Thread starter rglasunow
  • Start date Start date
R

rglasunow

Is there a way in Access to put the user's name in a msgbox. I know i
Excel you can just write

MsgBox "Good Afternoon " & Application.UserName & "."

However, I've found in Access it's not the same. Any sugestions?

Thank you
 
If your database is using Access Security you can use:

MsgBox "Good Afternoon " & CurrentUser

Otherwise, go to the following link and copy the code found there to a
Module.

http://www.mvps.org/access/api/api0008.htm

Then, you can code your message box as follows:

MsgBox "Good Afternoon " & fOSUserName()

hth,
 
Back
Top