I usually use the following code and then do an if statement in the on open event.

Public Function GetUserName() As String
    GetUserName = Environ("USERNAME")
End Function