Hi, I am trying to change the font color of a text input box when an on change event has occurred.
So when the box is first displayed it has text saved from a our table which is displayed in black. When the user changes this text I would like the tool to then show the font color as Red until the Save button is clicked.
I have tried everything that I know in the OnChange event, and cannot get it to work.
Any help appreciated!
Thanks
RBrookhart
The OnChange event triggers when you press Tab or come out of the textbox. So it wont change the color as you type, but will change once you type and come out of the textbox.
You can check the behavior of the Onchange event by simply setting a variable initially to False and in the OnChange set it to True and have a label on your screen to display that variable's value. It will turn to True after you come out of the box and not as you type.
The KeyPress event of Visual Basic used to do this :).
You can use the UpdateContext() function to set a local variable value to the color you want, then set the label's font color property to that variable. OnChange, you'll update the variable's value and the font will change.
---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 2