You originally used TYPE whereas MMcDonal used CONTROLTYPE. I also have never been able to get that to work so I have had to use tags and compare the TAG properties. So both your solutions will be something I'll try in the future, i.e. ControlType and TypeOf.
Remember to write code to change the backcolor BACK to white when the data is actually entered!
Note, if you use conditional formatting to make any field with the focus change backcolor, there would be no need to actually assign the backcolor at all. It'll just automatically change to yellow and back to white when a field gets/loses focus.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|