I currently have several on errrors go to eg:
These are used for specific parts of my code to identify what has gone wrong. However if an error occurs between "On Errors" then I have to trawl through my code running it to find the problem.
Is there a way of having just one On Error goto and recording at what point the error occured ie which query didn't run successfully etc ?
Thanks for you time in advance
Code:
IMPORTATN:
DoCmd.OpenQuery "dltErrorLog", acViewNormal, acEdit
DoCmd.RunSQL ("INSERT INTO tblErrorLog ( Errortext )VALUES ('There has been an error with importing ATN');")
DoCmd.Quit
These are used for specific parts of my code to identify what has gone wrong. However if an error occurs between "On Errors" then I have to trawl through my code running it to find the problem.
Is there a way of having just one On Error goto and recording at what point the error occured ie which query didn't run successfully etc ?
Thanks for you time in advance