BUG: Data in Bound Text Box Does Not Return to Original Value After CancelUpdate If Changed in Code
Dec.18, 2009 in
data access
Symptoms
When you update a bound text box by setting its text property in code, and then you call a CancelUpdate method, the value in the field does not revert to its original value.
Resolution
Instead of setting the text property of the bound text box, set the value of the underlying recordset field directly, as follows:
Adodc1.Recordset!LastName = “Smith”
The bound text box should update itself after you run the code. Subsequent calls to the CancelUpdate method then work as expected, and change the text box contents back to its original value.

Leave a Reply