G
Guest
Hello
I have a continuous form with a textbox called txtGroupNum that holds a
value called GroupNum. In the underlying table, this is a req'd field
restricted to an integer from 1 to 9. When the form is first opened, this
field is null for each record.
I would like the backcolor to be red if the field is empty but white if it
has a value. I tried the following code, but it makes all of the fields
either red or all white. Any clues how I can 'red' only the null fields?
Sub txtGroupNum_AfterUpdate()
txtGroupNum = IIf(IsNull(GroupNum),255,16777215)
End Sub
I have a continuous form with a textbox called txtGroupNum that holds a
value called GroupNum. In the underlying table, this is a req'd field
restricted to an integer from 1 to 9. When the form is first opened, this
field is null for each record.
I would like the backcolor to be red if the field is empty but white if it
has a value. I tried the following code, but it makes all of the fields
either red or all white. Any clues how I can 'red' only the null fields?
Sub txtGroupNum_AfterUpdate()
txtGroupNum = IIf(IsNull(GroupNum),255,16777215)
End Sub