在窗體中修改數(shù)據(jù)時,關(guān)閉窗體,數(shù)據(jù)已經(jīng)修改,這樣很容易產(chǎn)生錯誤數(shù)據(jù). 可采用如下方法解決: 在窗體更新前判斷: Private Sub FORM_BeforeUpdate(Cancel As Integer) If MsgBox("保存嗎?", vbYesNo, Me.Caption) <> vbYes Then Cancel = True End If End Sub 去除系統(tǒng)的報錯信息: Private Sub FORM_Error(DataErr As Integer, Response As Integer) Response = acDataErrContinue End Sub |
|站長郵箱|小黑屋|手機版|Office中國/Access中國
( 粵ICP備10043721號-1 )
GMT+8, 2025-7-17 05:51 , Processed in 0.081327 second(s), 23 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.