Dim account_amt As Double
Dim tran_total As Double
Dim tran_amt As Double
account_amt=Cursor1.Getdouble("Current Balance")
***
query = "Select * FROM Tran WHERE [Account ID] = " & acct_id
Cursor2 = SQL.ExecQuery(query)
Select Cursor2.RowCount
Case 0
tran_total=0
Case Else
For j = 0 To Cursor2.RowCount - 1
Cursor2.Position=j
tran_amt=Cursor2.Getdouble("Amount")
tran_total=tran_total+tran_amt
Next
If account_amt<>tran_total Then
Log (acct_id & "*" & account_amt & "*" & tran_total)
End If
End Select