I wanted to know if there was an easy way to password protect three different forms in my data base. I don't know VBA or SQL (so bear with me) I got a response from Aivars (Programmer) Jun 7, 2001. Aivars said this would solve all my problems... The ony problem is NOW WHERE DO I PUT THIS??? WHAT DO I DO NEXT??? I'm lost and I really need for this to work by Monday... SOS!!!!
Function IsUserInGroup(Optional strUser As String = "", Optional strGroup As String = ""
As Boolean
'This function verify user's permissions and
'return True if user have needed user group
'If is omitted strUser (user name), CurrentUser is verified
On Error GoTo Err_IsUserInGroup
Dim usr As User
If strUser = "" Then strUser = CurrentUser
If strGroup = "" Then strGroup = "Admins"
Set usr = DBEngine.Workspaces(0).Groups(strGroup).Users(strUser)
IsUserInGroup = True
Exit_IsUserInGroup:
Exit Function
Err_IsUserInGroup:
If Err.Number <> 3265 Then '3265 >>> Item not found in this collection.
MsgBox "Error No " & Err.Number & vbLf & Err.Description, , "Function IsUserInGroup"
End If
Resume Exit_IsUserInGroup
End Function
HELP PLEASE!!!!
Function IsUserInGroup(Optional strUser As String = "", Optional strGroup As String = ""
'This function verify user's permissions and
'return True if user have needed user group
'If is omitted strUser (user name), CurrentUser is verified
On Error GoTo Err_IsUserInGroup
Dim usr As User
If strUser = "" Then strUser = CurrentUser
If strGroup = "" Then strGroup = "Admins"
Set usr = DBEngine.Workspaces(0).Groups(strGroup).Users(strUser)
IsUserInGroup = True
Exit_IsUserInGroup:
Exit Function
Err_IsUserInGroup:
If Err.Number <> 3265 Then '3265 >>> Item not found in this collection.
MsgBox "Error No " & Err.Number & vbLf & Err.Description, , "Function IsUserInGroup"
End If
Resume Exit_IsUserInGroup
End Function
HELP PLEASE!!!!