RE: Cancel Error Message and resume
- From: Dennis <Dennis@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Nov 2006 08:45:01 -0800
Yeah, he could do that. But why not just:
recSet.Open "delete * from [table] where [key] = " & value
in VBA? All done. No error traps needed.
"Daniel" wrote:
run your code and remeber the error number being raised and replace the xxxx.
with it in the following code
On error got Err_Handler
Your code
Err_Hanlder
If err.number<>xxxx then
msgbox err.num & vbcrlf & err.description
End if
Resume Next
checkout http://www.cardaconsultants.com/en/msaccess_vba.html it covers
error handling a little bit.
Daniel
"Wes" wrote:
Hello,
Hope you are doing well.
I have code written that outputs a table and then opens the table that
was output, selects all records, and deletes the records. The problem
is, if there are no records in the table, the code errors and stops.
Is there script I can add that will ignore the error and resume the
code?
Thanks.
- References:
- Cancel Error Message and resume
- From: Wes
- RE: Cancel Error Message and resume
- From: Daniel
- Cancel Error Message and resume
- Prev by Date: Re: IIF Statement?
- Next by Date: Re: Adding an option to shortcut menu
- Previous by thread: RE: Cancel Error Message and resume
- Next by thread: Re: Cancel Error Message and resume
- Index(es):
Relevant Pages
|