I'm concerned because you speak of when "we make any changes in the tables." If you're entering data directly into your tables you need to change this! There are a plethora of things you can't do, entering data in this manner, one of which is the very thing you're speaking of here. So if you are entering data directly into your tables, you need to modify your database by creating form(s) for data entry. You can do this very easily using the Forms Wizard.
If you are, in fact, entering your data thru forms, or after creating forms to do this, this code, placed in the form's code module, will ask users if they want to save changes and either save the changes or dump them:
- 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 Record?", vbQuestion + vbYesNo + vbDefaultButton1, "Save This Record ???") = vbNo Then
-
Me.Undo
-
End If
-
End If
-
End Sub
-
Welcome to TheScripts!
Linq
;0)>