Show "0" for Null Values in List Boxes

D

DEI

I've written the following code that sums the values of
list boxes (which are counts) on a report. I would
like "0" to show in the list bixes when the the value is
null, but it still needs to be present for the calculation.

What is the best way to convert the null values to "0"?

Thanks

Dim sumopen2qt
Dim sumopen1qt


If open2qt.ItemData(0) <> "" Then
sumopen2qt = CLng(open2qt.ItemData(0))
Else
sumopen2qt = 0
End If

If open1qt.ItemData(0) <> "" Then
sumopen1qt = CLng(open1qt.ItemData(0))
Else
sumopen1qt = 0
End If

Sumclients = sumopen1qt + sumopen2qt

If Sumclients <> 0 Then
Totalclients.Value = Sumclients
Else
Totalclients.Value = ""
End If
 
Top