froggiebeckie
Registered User.
- Local time
- Today, 10:58
- Joined
- Oct 11, 2002
- Messages
- 104
I found some code on here that requires user verification before creating new records in a form. I placed this in the BeforeUpdate event.
This works perfectly on the first form, but I have several different forms for entering/editing records in different tables.
My question is, what's the simplest way to apply this to all my data entry forms?
Thanks, in advance.
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not (Me.NewRecord) Then
If MsgBox("Would You Like To Save The Changes To This Record?", vbQuestion + vbYesNo + vbDefaultButton1, "Save Changes to Record ???") = vbNo Then
Me.Undo
End If
Else
If MsgBox("Would You Like To Save This New Record?", vbQuestion + vbYesNo + vbDefaultButton1, "Save This Record ???") = vbNo Then
Me.Undo
End If
End If
End Sub
This works perfectly on the first form, but I have several different forms for entering/editing records in different tables.
My question is, what's the simplest way to apply this to all my data entry forms?
Thanks, in advance.