If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How do i set notification of changes to a database
Hi ...
I have got a database that several users work on. I want to know how do i set an option that appears a confirmation massage upon attempting to save/do any changes on current record before seving them - like "Are you sure you want to save changes to this record?" any thoughts ! |
#2
|
|||
|
|||
How do i set notification of changes to a database
put some code in the form's BeforeUpdate event procedure, as
If MsgBox("Are you sure you want to save " _ & "changes to this record?", _ vbYesNo + vbDefaultButton2) = vbNo Then Cancel = True MsgBox "Changes NOT saved." End If the default button in the messagebox is the No button - so if the user hits Enter without reading the question and/or deliberately choosing the appropriate response, the edits will not be saved. (i often set up critical points of "user decision-making" to default to "nothing is changed", because many users habitually Enter through message boxes without reading them.) in the above code, the update is simply stopped, and nothing else. if you want the edits *removed* and the original data restored, automatically, then add the following line directly AFTER the Cancel = True line, as Me.Undo hth "zolono" wrote in message ... Hi ... I have got a database that several users work on. I want to know how do i set an option that appears a confirmation massage upon attempting to save/do any changes on current record before seving them - like "Are you sure you want to save changes to this record?" any thoughts ! |
Thread Tools | |
Display Modes | |
|
|