AlbertoD and Rick, thank you for the replies. I’m in the learning stage so I appreciate your efforts. I’ve removed the Val but now I’m faced with the following. It seems there is a huge learning curve!
OverviewWindow.PopulateCalculationsListBox, line 28
Parameter “value” expects type Double, but this is type String.
txtTotal.text = Format(total, “###,###,##0.00”)
My code starts here.
// Load all applicable recordSets based on the SQL statements in the Opening code
// Loop until reach end of recordSets
While not rs.eof
lb.addRow""
For i = 1 to rs.fieldCount
lb.cell(lb.lastIndex, i - 1) = rs.idxField(i).stringValue
Next
rs.moveNext
Wend
// All recordSets have been added to the CalculationsLB and must be tallied to provide
// a total to be placed in the appropriate cell of the ExpensesLB
Dim total as Double
For i = 0 to CalculationsLB.LastRowIndex
total = total + (CalculationsLB.Cell(i,4))
Next
You can also read about string.replace and string.replaceall over here: String — Xojo documentation
and maybe remove the commas on your strings numbers.
AlbertoD and Rick, thank you very much for your help. My problem has been fixed and it’s running fine. Never would have figured this out without your help.