Pasting to Unbound Control

jaydwest

JayW
Local time
Yesterday, 18:00
Joined
Apr 22, 2003
Messages
340
I'm pasting a string from the Clipboard into an unbound form. I can see the string in the field, but the field is not dirtied by pasting the string into the field, so in code, the value of the field is null.

What's the best way to dirty the field.

:o Thanks
 
I'm guessing that the problem comes from the fact that the form is unbound. The Dirty property is True or False depending on whether or not the current record has been changed and not yet saved. I don't know if such a thing makes sense with an unbound form....but I could be wrong. :(
 
Just to confirm. The Dirty property is only affected by a bound form. Likewise, the Dirty event only triggers on a bound form.

And if the form in unbound then how can you say you have a field on your form?
 
Always nice to have independent confirmation. My suggestion: if you want to track when things have been "changed" on the form, place code in every control's On Change event to change the value of a global variable, or the value of a hidden control on the form to let you know it's been "dirtied".
 
Thanks for all the advise. I discovered the solution shortly after I posted the question. Data is not changed or updated under a program action so those events wouldn't work. I simply set the focus on the close button. This committed the entry to the field and voila I could get access to the data.

Thanks again.
 

Users who are viewing this thread

Back
Top Bottom