Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dirty property for form control?

Status
Not open for further replies.

jhaganjr

IS-IT--Management
Dec 11, 2002
62
US
Using Form.Dirty I can tell if the current form record has been edited and not yet saved. I cannot find a similar property for a control on the form.

I'm trapping the Escape key with KeyPreview events and want to be able to tell if the user is editing the current control when they press Escape.

The closest thing I can find is to compare the .Value of the control to the .Text of the control. This is has all kinds of problems. It would be so much easier if the control supported its own .Dirty property.

Got any ideas?

Thanks!
 
Perhaps the .OldValue (if the control is bound) ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
jhaganjr,

What kind of control is it? Most do have a .Dirty property...

Ken S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top