If you use the change event as the second link suggests, it will fire upon each character entered when based on the post, it need fire only once. Maybe the OP would like to validate when this coloring has to take place. Only after something is entered and the user chooses another control (or the first control otherwise loses the focus or the record is updated)? Or perhaps only when a button was clicked. Or maybe some of the first 3 formats need to be applied on form opening too (likely not this 'starting with G thing). Looks like a lot of code there - especially how the colors are defined. Ajax, are you referring OP to that page because you're saying, for example, that the vb color constants post date version 2002? I might be fooling myself, but I suspect it could be simpler than what's showing there. Maybe I just think much of the current properties/methods available have been around longer than what they have been.
Last edited by Micron; 03-25-2016 at 10:25 PM.
Reason: clarify last sentence
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.