在窗体中修改数据时,关闭窗体,数据已经修改,这样很容易产生错误数据. 可采用如下方法解决: 在窗体更新前判断: Private Sub FORM_BeforeUpdate(Cancel As Integer) If MsgBox("保存吗?", vbYesNo, Me.Caption) <> vbYes Then Cancel = True End If End Sub 去除系统的报错信息: Private Sub FORM_Error(DataErr As Integer, Response As Integer) Response = acDataErrContinue End Sub |
|站长邮箱|小黑屋|手机版|Office中国/Access中国
( 粤ICP备10043721号-1 )
GMT+8, 2025-4-2 12:10 , Processed in 0.163467 second(s), 23 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.