Keep in mind that what you are checking is whether the user is in the
workgroup file in use, not the database..
From the security FAQ:
Dim ws as Workspace
Dim StrUser as String
Set ws = DBEngine.Workspaces(0)
On Error Resume Next
strUser = ws.Users("Tony").Name
If Err.Number = 0
'the user exists
Else
'they don't
End If
Keep in mind that what you are checking is whether the user is in the
workgroup file in use, not the database..
From the security FAQ:
Dim ws as Workspace
Dim StrUser as String
Set ws = DBEngine.Workspaces(0)
On Error Resume Next
strUser = ws.Users("Tony").Name
If Err.Number = 0
'the user exists
Else
'they don't
End If
--
Joan Wild
Microsoft Access MVP
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.