Full Version: "On Dirty" with an unbound control
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
jsalley
Hi All,

I'm trying to execute a bit of code based on the "On Dirty" value of an unbound control and it doesn't seem to be working. Is there a limitation for this such that it has to be bound? The "On Enter" event occurs and the code will execute, but that's not really what I want.

thanks,

The Whiz
Jack Cowley
Try your code in the controls After Update event...

hth,
Jack
AQM_UK
I think you will find that on dirty is for bound controls only. It is looking for the little pencil that shows in the table.

I do not think it will work for unbound controls.

As my drinking buddy Jack says, the after update is probably best for this.

Jim

Edited by: AQM_UK on Mon Nov 27 16:40:20 EST 2006.
schroep
You should be able to emulate the function of OnDirty for an unbound control using the OnChange event (which will fire the instant a change is made, rather than at the update). It will fire at EVERY change, of course, so you will need to be sure your code handles that.
jsalley
Thanks guys. That's what I figured so I used the "On Change" instead while I was waiting on your collective wisdom.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.