Dear All
I’ve set a few forms up so that certain user groups can’t open them, however if code is run to open these forms they are offered the option of ending or debugging the code, not a simple message “No permissions”, or whatever. I’ve got the standard error trapping in the code as attached. So what have I done wrong / missed?
This is my first foray into Access Security and is causing a few grey hairs (OK it’s the old age responsible for the grey, but I need summat to blame ).Private Sub RejFollowUpBtn_Click()
On Error GoTo ErrHandler
DoCmd.OpenForm “FollowUpDataEntryFrm”, acNormal
ExitSub:
Exit Sub
ErrHandler:
If Err.Number = 2603 Then
MsgBox “You do not have access to this area of the database”, vbOKOnly
Resume ExitSub
Else
MsgBox Err.Description
Resume ExitSub
End If
End Sub
I’ve tried using a Select Case statement in my error handler, along the lines of: –
Select Case Err.Number
Case Err.Numbner = 2603
msgbox Err.Description
Resume ExitSub
Case Else
etc etc
While I can change the message on the pop up de###### form, I can’t prevent the thing from offering the user the option to view my code. They are not allowed to edit it, that much works, but it is not as ‘neat and tidy’ as I like to have a system.
Thanks
Ian