エラーコード失念して毎回確かめてる
Private Sub Form_Error(DataErr As Integer, Response As Integer)
Select Case DataErr
Case 2113 '書式に適さなかった
Response = acDataErrContinue '既定アラート抑止
Case 2279 'InputMaskに違反
Response = 0 '0でもいい
ActiveControl.Undo
Case 2107 '入力規則に違反
Response = 0
MsgBox ActiveControl.Name & "は、○○です。", vbInformation, "入力規則違反"
Case Else
Response = acDataErrDisplay
End Select
End Sub
0 件のコメント:
コメントを投稿