Select to view content in your preferred language

Has data in form changed - called from the OnOK event

2954
1
09-07-2010 03:34 AM
by Anonymous User
Not applicable
Hello,

Is there code that will help me to know whether any of the data/values in an edit form have changed or not. I want to call a sub from the OnOK event of a form that will update a 'survey date' field, but only if any of the values were changed or edited. So if they were not changed or edited they were basically not surveyed.

I gues something like:

If Application.Forms(Form1).Pages(Page1) = changed? Then

Thank you very much.

Salome'
Tags (3)
0 Kudos
1 Reply
GarethWalters
Deactivated User
Hi Salome,

How about writing the attributes to a set of Application.UserProperties("Field1") values so that you have the records in memory when the form is first opened, then when you press ok you can check to see:
if Application.Userproperties("field1") = Application.Map.layers("yourlayer").Forms("EditForm").Pages("YourPage").Controls("txtField1").Value then
  do your update
end if

Hope this helps.

Cheers,

Gareth
0 Kudos