How to get logged-in user’s name in Access vba? [duplicate]

Try this:

Function UserNameWindows() As String
     UserName = Environ("USERNAME")
End Function

Leave a Comment