Hi,
I have a form called frmMaster. I am trying to apply a code when the form is closed mid entry or full entry, So that the user can discard the changes if necessary. I am having some trouble when the form is fully completed. It closes even though I give a vbNO option. Would appreciate some help to sort my code.
I got this code from the net and was trying to use it for my purpose.
In the Current Event bClose = false and my Save button bClose = true.
Any idea why my for is closing??
I have a form called frmMaster. I am trying to apply a code when the form is closed mid entry or full entry, So that the user can discard the changes if necessary. I am having some trouble when the form is fully completed. It closes even though I give a vbNO option. Would appreciate some help to sort my code.
I got this code from the net and was trying to use it for my purpose.
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)my
If bClose = False Then
If MsgBox("Do you want to save the changes?", vbYesNo) = vbNo Then
Cancel = True
Exit Sub
End If
End If
End Sub
In the Current Event bClose = false and my Save button bClose = true.
Any idea why my for is closing??