I use this code to sum up column 9 into a list box whenever its requeried but if there isn't at least a $0.00 in the column it says I have a data type problem. It's hung up on the NULL's. The data type in the table the value is held is set to currency. I've tried NZ, I've tried Format, IsNull() but nothing seems to work. Messes up on the line:
Any help would be aprpeciated:
Code:
listsum4 = listsum4 + (Forms!FRM_MAIN!LST_OPEN_BALANCES.column(9, x))
Code:
Public Function AMTCOLLECTED()
Dim listrs4 As Single
Dim listsum4 As Single
listrs4 = Forms!FRM_MAIN!LST_OPEN_BALANCES.ListCount
If listrs4 = "0" Then
Forms!FRM_MAIN!TXT_AMT_COLLECTED.Value = "0"
Else
x = 1
Do
listsum4 = listsum4 + (Forms!FRM_MAIN!LST_OPEN_BALANCES.column(9, x))
x = x + 1
Loop Until x = listrs4
Forms!FRM_MAIN!TXT_AMT_COLLECTED.Value = listsum4
End If
End Function