I have a colleague who needs some advice on an SQL statement.
Any assistance is appreciated. TX
The question:
I need to total 2 text fields and deduct 2 test fields in a sting.
The deduction works perfectly but the Sum is “Concatenating” like Excel's function because the field is text.
Do you perhaps know what can be done to convert to numbers before I add them together.
Code: Select all
If daoRst.fields(i).Value = "Paid amount" Then
strInsertSQL1 = strInsertSQL1 & ", (" & daoRst.fields(i).Name & " + " & daoRst.fields(i + 4).Name & ")"
ElseIf daoRst.fields(i).Value = "Outstanding amount" Then
strInsertSQL1 = strInsertSQL1 & ", (" & daoRst.fields(i).Name & " - " & daoRst.fields(i + 2).Name & ")"
Else...