
Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Trying to perfect this a little more...
>
[quoted text clipped - 37 lines]
> How
> do I accomplish this?
You are correct, strFnctoCall is raising the error and reporting it via the
statements below. So how do I make TimeLoop aware of the error so it can
"bail out" and not continue on to the MsgBox "process completed
successfully"?
MassImport_Exit:
DoCmd.SetWarnings True
Exit Function
MassImport_Err:
MsgBox Err.Number & ": " & Err.Description, vbCritical, "Error
Notification"
Resume MassImport_Exit
> Sounds as though strFncToCall is raising the error, handling it, then using
> Resume to clear the error, so that TImeLoop knows nothing about it.
[quoted text clipped - 43 lines]
> > How
> > do I accomplish this?
Douglas J. Steele - 28 Sep 2007 17:43 GMT
Does MassImport return anything? If not, have it return True if successful,
and False if not, and then trap that value in the calling routine.
Otherwise, you could change
MassImport_Err:
MsgBox Err.Number & ": " & Err.Description, vbCritical, "Error
Notification"
Resume MassImport_Exit
to something like:
MassImport_Err:
MsgBox Err.Number & ": " & Err.Description, vbCritical, "Error
Notification"
Err.Raise -1
Resume MassImport_Exit
and then change your error handler in the calling routine to check for
Err.Number = -1 and take a different action than for a "legitimate" error.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> You are correct, strFnctoCall is raising the error and reporting it via
> the
[quoted text clipped - 64 lines]
>> > How
>> > do I accomplish this?