Taff said:
Try this,
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim strMsg As String
strMsg = "Data has changed."
strMsg = strMsg & " Do you wish to save the changes?"
If MsgBox(strMsg, vbQuestion + vbYesNo, "Save Record?") = vbYes Then
'do nothing
Else
DoCmd.RunCommand acCmdUndo
'For Access 95, use DoMenuItem instead
'DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
End If
End Sub
Ant.
thank you
I got it to work somehow, but there's a little bug when saving the record
i'll post my code in a couple of days, maybe ya can tell me what's wrong
but it's working
the bug only shows up if the user saves by clicking YES and then keeps working on that same record
then he doesn't get the confirmation message
it just saves it
but i'll try it your way next time i'll go there
for now i left it like that
thank you very much
some people here are dorks and instead of helping, they waste space by trying to look cool
of course, that's easier than posting the PERFECT solution
but instead, people here like to post some code and a phrase like
"it's really simple, you should've found this in the help file"
and not even realize that they didn't understand what I asked for and their code is useless
anyway, thanks again
i'll definitely try it
it looks like what i need, and even if not, it's a start
i'm sure i'll be able to make it work
that was all i needed, a start
i'm not stupid, i don't need for you guys to write my programs
i'm actually pretty good at this
but sometimes i get stuck and don't even know how to approach something
that's when i come here
and even if i don't get a solution, i always get at least a direction from you guys, and that's enough