Although I have used the code below to suppress the DoCmd cancel
action message from appearing on lots of other actions such as preview
and print, I have not been able to get to work on a BeforeUpdate Event
Procedure. There is nothing elaborate about the event, however, there
is an initial message box stating that if one field contains data then
a second one must also, and then after clicking okay, the
DoCmdMenuItem action box is displayed.
Any suggestions on addressing this problem will be appreciated.
Thanks.
Private Sub Form_BeforeUpda te (Cancel As Integer)
Exit_Form_Befor eUpdate:
Exit Sub
Err_Form_Before Update:
Const conErrDoCmdCanc elled = 2501
If (err = conErrDoCmdCanc elled) Then
Resume Exit_Form_Befor eUpdate
Else
MsgBox err.description
Resume Exit_Form_Befor eUpdate
End If
End Sub