D
David Portwood
Suppose I have error handling code similar to the following:
Err_MyFunction:
on error resume next
rst1.close
rst2.close
I don't want to see an error message from trying to close recordset vars
which are already closed. I actually want/expect them to be closed. But of
course, depending on where the error occurred, one or both rst vars might
still be open when the error handler fires, so I put the "resume next"
statement to guard against this eventuality.
But suppose both rst vars are already closed when the error handler fires?
In this case, both close statements should generate an error. Does the one
"resume next" cover this? Do I need two "resume next" statements?
Err_MyFunction:
on error resume next
rst1.close
rst2.close
I don't want to see an error message from trying to close recordset vars
which are already closed. I actually want/expect them to be closed. But of
course, depending on where the error occurred, one or both rst vars might
still be open when the error handler fires, so I put the "resume next"
statement to guard against this eventuality.
But suppose both rst vars are already closed when the error handler fires?
In this case, both close statements should generate an error. Does the one
"resume next" cover this? Do I need two "resume next" statements?