Hi,
I am using the following 2 codes in my forms before update event, Ist code is to warn the user if he dont choose any one of the check box and it will give the msg box only when the user not selected any one of the check box, and i want the second code not to run and display the msg when the 1 st code gives the warning message since the record is not ready to save.
Private Sub Form_BeforeUpdate(Cancel As Integer)
'User to Select the Product before save
'Provide the user with the option to save/undo
'changes made to the record in the form
If Check107 = No And Check138 = No And Check156 = No Then
MsgBox "choose any one of the check box"
Cancel = Yes
End If
If MsgBox("Changes have been made to this record." _
& vbCrLf & vbCrLf & "Do you want to save these changes?" _
, vbYesNo, "Changes Made...") = vbYes Then
DoCmd.Save
Else
DoCmd.RunCommand acCmdUndo
End If
End Sub
I am using the following 2 codes in my forms before update event, Ist code is to warn the user if he dont choose any one of the check box and it will give the msg box only when the user not selected any one of the check box, and i want the second code not to run and display the msg when the 1 st code gives the warning message since the record is not ready to save.
Private Sub Form_BeforeUpdate(Cancel As Integer)
'User to Select the Product before save
'Provide the user with the option to save/undo
'changes made to the record in the form
If Check107 = No And Check138 = No And Check156 = No Then
MsgBox "choose any one of the check box"
Cancel = Yes
End If
If MsgBox("Changes have been made to this record." _
& vbCrLf & vbCrLf & "Do you want to save these changes?" _
, vbYesNo, "Changes Made...") = vbYes Then
DoCmd.Save
Else
DoCmd.RunCommand acCmdUndo
End If
End Sub