okay, so if my windows id is TEST01, and I have Environ("username") = TEST01 it should theoritcally recognize it?
I have tested with my windows id, and it does not work. Is there a particular mode I need to have the db run in?
sorry......just walked back to the pc.....did not know i posted already.
Question is the code does not work, so how would i go about this? The msgbox comes up regardless of the user.
I am trying to put together some code that will check the username upon opening the db. If the username matches, then the db stays open, otherwise it closes.
Public Function StartUp1()
If Environ("USERNAME") = xxxxxxx Then
Else
MsgBox ("Sorry :(")
Application.Quit
End If
End Function