Re: Save button on a form
Sure thas an easy one. If you create a boolean variable at the form level you can set it to false after the forms loads. Then in each control change event you can set your boolean flag to True. When you click on the save button you change it back to false. If the variable is false when save is clicked you dont write out to your log file. ;)
Re: Save button on a form
thanks rob. Can I ask you another question?
Is there a way for me to manually set to false the form dirty property? Thanks
I made sure to rate your earlier post.
Re: Save button on a form
Re: Save button on a form
danny, this does not seem to work. Once I have done me.dirty = false, on subsequent edits or changes to the form the dirty property is not automatically set to true again
Re: Save button on a form
The property will switch back to true as soon as a bound field control is changed..
For example when a form initially loads it's dirty property is False
As soon as a textbox has it's entry changed if you peform a msgbox stating simply
Then it should say True.. if it doesn't then your control is not bound.
Re: Save button on a form
yes you are right. My control is unbound. Any way to get it done in this.
Re: Save button on a form
What you will have to do is capture the control's original value before any changes are made.. then after it has been made check to ensure that it is different and then set the dirty property to true.
Re: Save button on a form
does this mean, that I will have to do it for each and every control? Because in that case, using me.dirty is not the only soln. I might as well use any flag variable for the purpose.
Re: Save button on a form
That is one of the things bound forms are good for..
Yes you will have to validate each control before sending it to the table..
If you do not want users directly changing the table's data then pull to a temporary table and bind the form to this.. therefore allowing an experienced user the option to review the changes and then submit them back to the main table..
Re: Save button on a form