RossWindows
Que?
- Local time
- Today, 00:51
- Joined
- Feb 25, 2008
- Messages
- 410
I have this code on a form that is usually displayed through a subform control of another form.
When the form is being displayed through a subform control:
If a user deletes a record, they are asked to confirm. If the user clicks No, that should be the end of the story, but for some reason, the user is asked a second time.
When the form is being displayed on it's own, the code works correctly and the user is asked only once to confirm the deletion.
Why is this happening?
Code:
Private Sub Form_Delete(Cancel As Integer)
If MsgBox("Are you sure you want to delete this note?", vbYesNo, "Confirm Delete") = vbNo Then
Cancel = True
End If
End Sub
When the form is being displayed through a subform control:
If a user deletes a record, they are asked to confirm. If the user clicks No, that should be the end of the story, but for some reason, the user is asked a second time.
When the form is being displayed on it's own, the code works correctly and the user is asked only once to confirm the deletion.
Why is this happening?