S
subbu
Hi,
I am using the do while loop to sum up the values for a
particular month.This i have to do for 12 months.Here is
my code
ssql = "SELECT * FROM UsageHistory"
Set rsUsageHistory = conn.Execute(ssql)
Set rsAmount = conn.Execute(ssql)
Dim ii As Integer
Do While Not rsAmount.EOF
strdt = rsAmount("RDG_DAT").Value
Do While (strdt = rsAmount("RDG_DAT").Value)
strAmount = strAmount + rsAmount
("AMT").Value
If Not rsAmount.BOF And Not rsAmount.EOF Then
rsAmount.MoveNext
End If
Loop
InvAmount(ii) = CStr(strAmount)
strAmount = 0#
If Not rsAmount.BOF And Not rsAmount.EOF Then
rsAmount.MoveNext
End If
Loop
Any error in the code??
regds
subbu
I am using the do while loop to sum up the values for a
particular month.This i have to do for 12 months.Here is
my code
ssql = "SELECT * FROM UsageHistory"
Set rsUsageHistory = conn.Execute(ssql)
Set rsAmount = conn.Execute(ssql)
Dim ii As Integer
Do While Not rsAmount.EOF
strdt = rsAmount("RDG_DAT").Value
Do While (strdt = rsAmount("RDG_DAT").Value)
strAmount = strAmount + rsAmount
("AMT").Value
If Not rsAmount.BOF And Not rsAmount.EOF Then
rsAmount.MoveNext
End If
Loop
InvAmount(ii) = CStr(strAmount)
strAmount = 0#
If Not rsAmount.BOF And Not rsAmount.EOF Then
rsAmount.MoveNext
End If
Loop
Any error in the code??
regds
subbu