I'm tying to get a procedure to work in a module. I have Access Security Installed an want to supply my own error message and routine. I know I'm doing alot of things wroung. Any help would be appreciated..
Public Sub ErrorHandler()
On Error GoTo ErrorHandler
Dim msg As String
If Err.Number = 2603 Then
msg = "You do not have Permission to open this object!"
MsgBox msg, , "Permission Error "
Err.Clear
End If
Exit Sub
ErrorHandler:
Select Case Err.Number
Case 2603
DoCmd.OpenForm "frmMain"
Case Else
End Select
Resume ' Resume execution at same line
' that caused the error.
End Sub
Public Sub ErrorHandler()
On Error GoTo ErrorHandler
Dim msg As String
If Err.Number = 2603 Then
msg = "You do not have Permission to open this object!"
MsgBox msg, , "Permission Error "
Err.Clear
End If
Exit Sub
ErrorHandler:
Select Case Err.Number
Case 2603
DoCmd.OpenForm "frmMain"
Case Else
End Select
Resume ' Resume execution at same line
' that caused the error.
End Sub