foreveryoung
Programmer
Just a little problem here. Consider the following
on error goto errorhandler
docmd.openquery "thequeryname"
docmd.openquery "thequeryname1"
docmd.openquery "thequeryname2"
leave:
exit sub
errorhandler:
msgbox "Error Occured"
resume leave
ok when the code reaches docmd.openquery "thequeryname1" and I know there is a key violation on running this append query I want the code to jump to errorhandler. Instead I am getting the large message saying 0 records were not copied due to unique index etc I am sure you are aware of this message.
Anyone know how to get to the errorhandler in this situation?
Thanks
David
on error goto errorhandler
docmd.openquery "thequeryname"
docmd.openquery "thequeryname1"
docmd.openquery "thequeryname2"
leave:
exit sub
errorhandler:
msgbox "Error Occured"
resume leave
ok when the code reaches docmd.openquery "thequeryname1" and I know there is a key violation on running this append query I want the code to jump to errorhandler. Instead I am getting the large message saying 0 records were not copied due to unique index etc I am sure you are aware of this message.
Anyone know how to get to the errorhandler in this situation?
Thanks
David