Code error trap/elimination?

Rod C

Registered User.
Local time
Today, 22:23
Joined
Dec 19, 2001
Messages
41
I am using “DoCmd.RunCommand acCmdInsertHyperlink” from a form button to run the Insert Hyperlink pop-up. The problem is that if the user clicks the Cancel button on the pop-up rather that entering a link and/or clicking the OK button the code errors. Any ideas on eliminating this error?
 
Put an error handler in the code behind your button. Once this is done, reference the err.number inside the EH. Trigger the error by operation and take note of the error number. Then update you error handler to include an if statement that traps for the error number and exits the procedure.
HTH
Chris
 

Users who are viewing this thread

Back
Top Bottom