Re: One more ! Calculating Recordset Values



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
>> %>
>>
>
>


.



Relevant Pages

  • Re: One more ! Calculating Recordset Values
    ... Well I am almost there lol, got the recordset to work properly returning all ... the values in the one "loop" so to speak and I can see them being returned ... >> Dim aTot, eTot, iTot, pSubTot, aStrengthSubTot, PTotal, SubTotal, ... >>> totals ...
    (microsoft.public.frontpage.programming)
  • Re: One more ! Calculating Recordset Values
    ... | There are the same amount of records in each recordset. ... |>> Loop ...
    (microsoft.public.frontpage.programming)
  • Re: One more ! Calculating Recordset Values
    ... There are the same amount of records in each recordset. ... >> Dim aTot, eTot, iTot, pSubTot, aStrengthSubTot, PTotal, SubTotal, ... >>> totals ...
    (microsoft.public.frontpage.programming)
  • Re: How to solve for smallest and largest int?
    ... snip ... ... > A simple example is a function that totals all the elements in an ... > for i in Item'Range loop ... However the programmer who has never used the dangerous languages, ...
    (comp.programming)
  • Re: One more ! Calculating Recordset Values
    ... 'Transfer recordset values to equation values ... 'Total = The sum of all the SubTotals ... Loop ...
    (microsoft.public.frontpage.programming)