How do i set notification of changes to a database

Z

zolono

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 !
 
T

tina

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top