Sorry you'll have to forgive me if I'm missing something obvious as I'm still learning the ropes. I'm basically trying to add up all of the values in a column (in a columnview). Here is my code:
PUBLIC SUB subTotal()
DIM i AS Integer
DIM sT AS Float
DIM amount AS Float
sT = 0
amount = 0
IF salesJournal.Count > 1
FOR i = 1 TO salesJournal.Count
amount = Val(salesJournal[i][3])
sT = sT + amount
NEXT
ENDIF
sT = sT + Val(salesJournal[0][3])
customerDisplay("Subtotal", sT, "", "")
END
The problem is that I get the error 'Null key' on the line
amount = Val(salesJournal[i][3])
when there is more than 1 item in the columnview. If anybody could help with this I'd greatly appreciate it, as it's driving me mad. Thanks!
PS. I have already checked to make sure that salesJournal[1][3] etc. does have a value.