Is Dirty for a field?

C

Chris Cairns

Is there a way to determine if the current field is dirty? I need to know
if a user has changed the value in the current field. That way if they press
the escape key I will allow access to undo the field but if it is not dirty
then I want to display a message to the user asking them to answer yes or no
to losing all of the changes to the current record which is what happens
when you press escape and the current field has not been changed.
 
S

Stefan Hoffmann

hi Chris,

Chris said:
Is there a way to determine if the current field is dirty? I need to know
if a user has changed the value in the current field.
Controls like TextBox have a .Dirty property.

DAO fields have a .OriginalValue property, so by comparing
..OriginalValue <> .Value gives you your "dirty" value.


mfG
--> stefan <--
 
M

Marshall Barton

Chris said:
Is there a way to determine if the current field is dirty? I need to know
if a user has changed the value in the current field. That way if they press
the escape key I will allow access to undo the field but if it is not dirty
then I want to display a message to the user asking them to answer yes or no
to losing all of the changes to the current record which is what happens
when you press escape and the current field has not been changed.


The AfterUpdate event only fires if the value was edited.
You can use this to simulate a dirty property for the
control.

If the control is bound to a record source field, you can
check the control's OldValue property to see if it's
different from the Value property.

Why do you think you need to use a non-standard UI?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Clicking label makes Dirty property True 10
Escaped, But Still Dirty 7
Escape Key on Forms 1
Dirty Me 6
Form Dirty 2
Keydown hierarchy and best practices 5
Cancel a listbox selection 0
On Dirty 2

Top