Help with error procedure (1 Viewer)

melodyF

Registered User.
Local time
Today, 01:40
Joined
Mar 20, 2002
Messages
19
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
 

doulostheou

Registered User.
Local time
Yesterday, 19:40
Joined
Feb 8, 2002
Messages
314
Specifically, what is going wrong when you run the above code?
 

cogent1

Registered User.
Local time
Today, 01:40
Joined
May 20, 2002
Messages
315
try Resume Next
 

Users who are viewing this thread

Top Bottom