Hi, but I don't want add the error trap for every form and for every procedure.and even I add the error trap in the form, for normal error, it can be captured such as i=i/0, but as the error raise from DAO, it still could not be capture by the error trap.how to solve this problem?
最好在模块里加一个错误处理,然后每个屏幕都可以调用Public Sub ErrorHandler() MsgBox Err.Description + Chr(13) + "请找系统管理员检查", vbExclamation, cProgramName End Sub屏幕private sub cmdOk_click() on error goto cError .... exit sub cError: call ErrorHandler '调用模块 end sub
最好在模块里加一个错误处理,然后每个屏幕都可以调用Public Sub ErrorHandler() MsgBox Err.Description + Chr(13) + "请找系统管理员检查", vbExclamation, cProgramName End Sub屏幕private sub cmdOk_click() on error goto cError .... exit sub cError: call ErrorHandler '调用模块 end sub
最好在模块里加一个错误处理,然后每个屏幕都可以调用Public Sub ErrorHandler() MsgBox Err.Description + Chr(13) + "请找系统管理员检查", vbExclamation, cProgramName End Sub屏幕private sub cmdOk_click() on error goto cError .... exit sub cError: call ErrorHandler '调用模块 end sub
MsgBox Err.Description + Chr(13) + "请找系统管理员检查", vbExclamation, cProgramName
End Sub屏幕private sub cmdOk_click()
on error goto cError ....
exit sub
cError:
call ErrorHandler '调用模块
end sub
MsgBox Err.Description + Chr(13) + "请找系统管理员检查", vbExclamation, cProgramName
End Sub屏幕private sub cmdOk_click()
on error goto cError ....
exit sub
cError:
call ErrorHandler '调用模块
end sub
MsgBox Err.Description + Chr(13) + "请找系统管理员检查", vbExclamation, cProgramName
End Sub屏幕private sub cmdOk_click()
on error goto cError ....
exit sub
cError:
call ErrorHandler '调用模块
end sub