another way to make it is to add one code after update of the text box
if int(me.textboxname.value) > 30 then
me.textboxname.BackColor = vbred
else
me.textboxname.BackColor = vbwhite
this way can be easier to control for me if there are not mathematical conditrion like on enter, on focus, on...