IF Me.Dirty

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

I have a form that is opened by a sub in another form. In this sub it opens
the form and then chooses a combobox that needs to be set enabled=false.
This works great BUT.... the form with the comboboxes has a close button
that checks

IF Me.Dirty then
str_Message = "Are you sure you want to change this record?"...etc

I think the code that sets the enabled property to the combobox is causing
the form to be dirty!

Is there a way to fix this problem? Or is there a better way to check for
changes in the form data?
 
Changing the Enabled property of a control will not dirty the form, so you
need to look elsewhere.

Is there anything in that procedure that assigns a value to a control?
Anything in Form_Current?

If you display the Record Selector (grey bar at left, the height of the
record), you will see its icon change from a triangle to a pencil when the
record is dirtied.
 
found the prob...thanks for the reply
Allen Browne said:
Changing the Enabled property of a control will not dirty the form, so you
need to look elsewhere.

Is there anything in that procedure that assigns a value to a control?
Anything in Form_Current?

If you display the Record Selector (grey bar at left, the height of the
record), you will see its icon change from a triangle to a pencil when the
record is dirtied.
 
Back
Top