J
JamesJ
I'm calling the following in the BeforeUpdate of my form to confirm
data changes.
Public Function ConfirmDataChange(Cancel As Integer)
Set frm = Screen.ActiveForm
Select Case MsgBox("Record(s) have been added or changed." _
& vbCrLf & "Save the Changes?", vbYesNoCancel, "Record
Change")
Case vbYes
Case vbNo
Cancel = True
frm.Undo
End Select
End Function
The Yes and No works fine. This form has no buttons and I'm
closing it by using the form's close (x) button. In both cases the
the form closes, but I want the vbCancel to prevent the from from
closing so the user can return to editing the record. What needs to
be put in the Case for the vbCancel the accomplish this?
Any help will be appreciated,
James
data changes.
Public Function ConfirmDataChange(Cancel As Integer)
Set frm = Screen.ActiveForm
Select Case MsgBox("Record(s) have been added or changed." _
& vbCrLf & "Save the Changes?", vbYesNoCancel, "Record
Change")
Case vbYes
Case vbNo
Cancel = True
frm.Undo
End Select
End Function
The Yes and No works fine. This form has no buttons and I'm
closing it by using the form's close (x) button. In both cases the
the form closes, but I want the vbCancel to prevent the from from
closing so the user can return to editing the record. What needs to
be put in the Case for the vbCancel the accomplish this?
Any help will be appreciated,
James