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

How to use the OldValue Property of Text Box Control

Status
Not open for further replies.

Jawad77

Programmer
Dec 23, 2004
41
US
I have a text box contriol that is bound to one of the fields of the table. I like to hightlight/changecolor of the data values in my textbox control when they are updated.

Can any tell me how to use the oldvalue property of the text box control to do it. Thanks!

Jay
 
How do you want it to work? For example, if the form is shown in datasheet view, do you want to see the changes for each of the records. Like this:

textbox1...Record 1 textbox2
textbox1...Record 2 textbox2
textbox1...Record 3 textbox2
textbox1...Record 4 textbox2

Or, suppose the form is shown in form view and a change is made to textbox1 of record 1 and textbox1's color is changed to red. Now the user goes to record 2 and then returns back to record 1. What color should textbox1 be now (red or black)?
 
Thanks Fancy for the reply. Once I change the value in my text box ... It turns to red like you said ... Now I only want it to change back to black only if my text box value returns to the original data value.

My form is in form's continuous view showing all records at the same time.

Plz let me know if i didn't make myself clear.

Thanks

Jay
 
In that case, you're going to have to store the original value someplace on your form (i.e. invisible field). Because as soon as you leave a record and return to it, the OldValue changes to the current value. Then checkout Format | Conditional Formating...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top