What code should i write in vb if text field is null then the text box background color to change into red and if its not null then the background color is yellow.
What code should i write in vb if text field is null then the text box background color to change into red and if its not null then the background color is yellow.
What code have you already tried?
Did you consider conditional formatting instead of code?
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
how can i do that? as i want to highlight if the text box field is null
Set the default background colour to red.
Use conditional formatting so if field value <>"" (or is not null) the colour is yellow
Thank You
I used
[NIC No]<>""
This worked as required
if your textbox name is for example (txt1) the code would be
if txt1.value = " " then
txt1.backcolor= vbred
else
txt1.backcolor = vbyellow
end if