Discussion Locked

Prompt a message before save records in Access

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

In Access 2000 or 2003, normally records are automatically saved after editing. I?ve just developed a database application using MS Access + SQL Server 2000. Colleagues say that they hope to have prompt message before saving records, so as to avoid mistaken modifications.
How can I realize this in MS Access?

4 replies

by dryflies

Do you have warnings turned on? If you have warnings turned on Access will automatically prompt you before adding deleting or modifying records (if you are working from table view it may not prompt for an added or modified record)

by wvonboecklin

Insert the following prior to moving to another record or closing the form:
Beep
If MsgBox("Do you want to save your changes?",vbYesNo,"Save Record") = vbYes then
... INSERT/UPDATE SQL Server table
ELSE
... DO NOT SAVE CHANGES/RECORD
End If

by karpi

Hello,

use the forms "before update" event

Select case Msgbox ("Save?",vbyesno)
case vbyes
case vbno
cancel=true
end select

HTH
Karpi

This discussion is closed to new replies.