Dirty event

poporacer

Registered User.
Local time
Today, 15:01
Joined
Aug 30, 2007
Messages
136
From my understanding the OnDirty event is only for forms with bound fields. I have a form with several unbound textboxes for data entry. What I would like to do is to find out if any of the textboxes have been altered, if so, then save the data....any suggestions?
 
On dirty applies only to bound objects, like controls.

Your textboxes will be ignored with the on Dirty property. what I would do is record the data when the form is opened, and then on the close of the form, check to see if the data is different in the controls. if so, save the form with docmd.save acform, me.name
 
Unbound controls will be empty when a form opens, will it not?
 
when you say, save the data, i take it you mean insert it into a table

therefore you need a button to do this, and in that you need to generate a sql insert or update statement. at this point you can examine your text boxes, and make sure they are populated appropriately.
 

Users who are viewing this thread

Back
Top Bottom