Yes! You'll be late for work!
Yes! You'll be late for work!
So I moved the Modules to my database and added the code of;
Private Sub Form_Open(Cancel As Integer)
Dim strGroupWithAccess As String
strGroupWithAccess = "Tester1"
Cancel = Not IsMemberOfSecurityGroups(strGroupWithAccess)
If Cancel = True Then
MsgBox "You have no access to this form.", vbExclamation
End If
End Sub
to a test form and I get the following 2 errors;
Object variable or With Block Variable not set
I click OK and then
Subscript out of range.
Not sure what I did incorrect.
I believe your error is coming from the IsMemberOfSecurityGroups function. Have you single stepped it to see what is going on?