Originally posted by lfc1lfc
I have this error handling statement:
on error goto fix:
fix: data1.Recordset.CancelUpdate
on the same statement i.e. fix I want to add this:
MsgBox "If a field is not filled in please enter N/A. This Record will not be saved", vbExclamation
I want this to come up along with CancelUpdate, but when I put it on the same line as data1.Recordset.CancelUpdate, I get a message saying "Expected end of statement"
Is there a way of doing what I want to do?VB Code:
on error goto Fix: Exit Function '(Or sub) Fix: data1.Recordset.CancelUpdate MsgBox "If a field is not filled in please enter N/A. This Record will not be saved", vbExclamation Exit Function '(Or sub)
My usual debug message:
VB Code:
Msgbox Err.Description, , "Error #" & Err.Number




Reply With Quote