Re: One more ! Calculating Recordset Values
- From: "RobA" <anon@xxxxxxxxxxx>
- Date: Tue, 08 Nov 2005 08:28:04 GMT
Thanks but I am still getting a type mismatch error.
"Kevin Spencer" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:OQe%23HzB5FHA.3876@xxxxxxxxxxxxxxxxxxxxxxx
> <%
> Dim Total
> Dim GrandTotal
> GrandTotal = 0
> Do While not aScrRst.EOF
> Do While not eScrRst.EOF
> Do While not iScrRst.EOF
> Total = iScrRst("Score") + eScrRst("Score") * aScrRst("Score")
> GrandTotal = GrandTotal + Total
>
> Response.Write "Total: " & Total
>
> aScrRst.MoveNext
> eScrRst.MoveNext
> iScrRst.MoveNext
>
> Loop
> Loop
> Loop
> Response.Write "GrandTotal: " & GrandTotal
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> A watched clock never boils.
>
>
> "RobA" <anon@xxxxxxxxxxx> wrote in message
> news:v0Sbf.8228$lJ.3691@xxxxxxxxxxxxxxxxxxxxxxx
>> Can anyone point me in the direction of some guidance for handling
>> recordset values.
>>
>> I am trying to calculate a resultant value (total) of adding 2 values and
>> mulitplying by the third.
>>
>> Eventually I wanted to get total for the resultant value (all the totals
>> added together) for the whole recordset!
>>
>> <%
>> Dim Total
>> Do While not aScrRst.EOF
>> Do While not eScrRst.EOF
>> Do While not iScrRst.EOF
>> Total = iScrRst("Score") + eScrRst("Score") * aScrRst("Score")
>>
>> Response.Write "Total"
>>
>> aScrRst.MoveNext
>> eScrRst.MoveNext
>> iScrRst.MoveNext
>>
>>
>> Loop
>> Loop
>> Loop
>> %>
>>
>
>
.
- Follow-Ups:
- Re: One more ! Calculating Recordset Values
- From: Stefan B Rusynko
- Re: One more ! Calculating Recordset Values
- References:
- One more ! Calculating Recordset Values
- From: RobA
- Re: One more ! Calculating Recordset Values
- From: Kevin Spencer
- One more ! Calculating Recordset Values
- Prev by Date: Re: Opening another page based on text box contents
- Next by Date: Re: One more ! Calculating Recordset Values
- Previous by thread: Re: One more ! Calculating Recordset Values
- Next by thread: Re: One more ! Calculating Recordset Values
- Index(es):
Relevant Pages
|