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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unbound text box oldvalues?

Status
Not open for further replies.

jofet

MIS
Sep 3, 1999
32
PH
is there a way i could get the old value of an unbound text box?

for example: there's a value in the unbound text box and i changed it, how do i get the previous value of that text box?
 
One way to do it is to create a function that saves the control's value in the control's tag property.

Private sub SaveValue(ctl as control)

ctl.tag = ctl.value

end sub

you can call this sub when you open the form, passing the control into it. This would hold the "old" value of the control until you close the form or decide to call the sub again.

Hope that helps

Bob
 
You can also use the OldValue property of a control which stores the original value of a control until changes are committed to disk. Look it up in help for more detail, it's quite effective.

HTH Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top