isladogs
Access MVP / VIP
- Local time
- Today, 04:58
- Joined
- Jan 14, 2017
- Messages
- 19,289
This is my standard error handling code:
	
	
	
		
If you have something like MZ Tools, you can add line numbering & pin the error to a particular line
To test your error handling, you can raise an error using a line like
	
	
	
		
which will return 'Invalid use of Null' as the error description
 
		Code:
	
	
	Private Sub cboError_AfterUpdate()
On Error GoTo Err_Handler
    'Procedure code here
    
Exit_Handler:
    Exit Sub
Err_Handler:
    strProc = "cboError_AfterUpdate"
    MsgBox "Error " & Err.Number & " in " & strProc & " procedure: " & _
        Err.Description, vbExclamation, "Application Error"
    Resume Exit_Handler
    
End SubIf you have something like MZ Tools, you can add line numbering & pin the error to a particular line
To test your error handling, you can raise an error using a line like
		Code:
	
	
	Err.Raise 94which will return 'Invalid use of Null' as the error description
 
	 
 
		 
 
		 
 
		 
 
		
 
 
		 
 
		 
 
		