Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

detect changes in unbound form

Status
Not open for further replies.

spizotfl

MIS
Aug 17, 2005
345
US
I know with a bound form you can use me.dirty to catch if the record has been changed, but is there a way to do the same thing with an unbound form, short of manually checking each field vs old values?


"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
 
You are correct, that is exactly the thought process I was going through. And I believe I also like the 4th way of using an array to maintain the values. Thanks for the response and the link.

"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
 
An update, if anyone cares....
While looking at the array option I noticed that the recordset value still showed my old value, so what I have decided to do is tag the control to match the position that the field comes up in the recordset. To see what has changed in a given record, I can loop through the form controls looking at the tag and comparing that with the field at that index in the recordset. not sure if this is much better or worse than the other suggestions, but I just hit on it and thought I would share.

"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
 
Spizotfl,

I used the array to store the following information:
The field name in recordset
The control name (seems an overkill because my control names are always the same as the field name)
The old value of the control
The data type of the field (for data validation purpose)
The user-friendly name of the control (for data validation purpose)

I thought about using tag, but I prefer putting all information in one place.

Seaport
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top