Full Version: Newbie : How to prevent updating fields/record until OK changes
UtterAccess Discussion Forums > Microsoft® Access > Access Tables + Relationships
ajacomp
Hello,

Users on a simple application are mistakenly overwriting data on the forms. I need to adjust the form to not update the fields or records until the user OKs the changes. Could someone point me in the general direction.

Thank you,
ajacomp
Jack Cowley
You can check the Dirty property in the forms Before Update event to see if the user made a change. If the did then notify them and then let them continue (save the changes) or exit without saving. With the cursor in the Before Update event and clicking F1 will tell you how this event works and will give you a code example or two...

hth,
Jack
ajacomp
Jack,

I counld not find a Dirty property for the form. I am in Access 97, is this a property that is available in this version? Maybe I'm not looking in the right place...

thanks again-
aja
Jack Cowley
In the Before Update event of the form you want to use code something like this:

If Me.Dirty Then
...data has changed do let the user know and let them choose what to do
End If

hth,
Jack
ajacomp
Hi Jack,

I understand now... many thanks!

- aja
Jack Cowley
You are welcome and good luck. If you hit a wall just post a new question and someone will be able to assist you.

Jack
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.