FORMATTING

  • Thread starter Thread starter pS
  • Start date Start date
P

pS

I ahve the following code imbedded in ON format and works
ok
If Nz([10]) = 0 Then
[10].BorderColor = vbWhite
Else
[10].BorderColor = vbBlack
End If

The field name is called [10]. The problem i have is
that the value of 0 is actually acceptable and i dont
want to change the border if the value is zero, only if
the content of the field is NULL but when i try
'If [10] is null' it does not work
any thoughts on how i should be handling nulls and zero
please
 
Try:
If Nz([10],"X")="X" then
[10].BorderColor = vbWhite
Else
[10].BorderColor = vbBlack
End If

or
If isnull([10]) then
[10].BorderColor = vbWhite
Else
[10].BorderColor = vbBlack
End If
 
Back
Top