View Full Version : Prompt to Save?


jadeverell
02-01-2008, 12:25 AM
Hi,

I have noticed that when i am editing an object within my database, specifically a query and click to close it, it doesn't prompt me to save the changes and does it automatically. There have been cases where i do not want to save the changes and just wanted to know if there was a simple setting to turn off automatic saves??

Thanks

James

Fernando
02-01-2008, 04:48 AM
Play with the BeforeUpdate event. Here is an example:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Select Case MsgBox("Would you like to save changes?", vbYesNo)
Case vbNo
Me.Undo
End Select
End Sub

Dennisk
02-01-2008, 05:13 AM
this sounds as though you have set warning off

Fernando
02-01-2008, 05:20 AM
I undestand now, maybe by mistake you have somewhere in your code to set warnings false but not to set it back to true.
In your immediate window run:
Docmd.SetWarnings True