comfirm data changes

  • Thread starter Thread starter Knowlton
  • Start date Start date
K

Knowlton

How do you check for data changes in a saved record's
controls. I want to require confirmation to save any
changes to an existing record. I know I can use the If
Then statement on the form's Before Update Event but I
don't know how to write the conditions.
Thanks,
Knowlton
 
If you are using Access 2000, there is a event called On_Dirty
Everytime when the underlying records get changed, the Me.Dirty = True otherwise Me.Dirty = Fals
What you may do is in the Before_Update event

If Me.Dirty = True the
Dim Ques as strin
Ques = Msgbox ("Are you sure",vbOKCancel
If Ques = vbCancel then cancel = tru
End I

Edmun
MCP - Access and SQL Serve
----- Knowlton wrote: ----

How do you check for data changes in a saved record's
controls. I want to require confirmation to save any
changes to an existing record. I know I can use the If
Then statement on the form's Before Update Event but I
don't know how to write the conditions
Thanks
Knowlto
 
Since the BeforeUpdate Event only fires when there are changes on the Form,
you don't need to have any condition.

In Edmund's code, the condition is unnecessary as if the execution gets to
the If statement, Dirty is *always* true.
 
As I understand it, I only need to use the Msg Box
function in the BeforeUpdate Event to confirm or undo
changes.

Thanks,
Knowlton
 
Back
Top