[AccessD] I need a better way to do this - looping

Michael R Mattys mmattys at rochester.rr.com
Wed Jan 2 13:21:58 CST 2008


Chester,

Sounds like you just need a running total in a query.
http://www.groupacg.com/AqryTip.htm#RUNNING

Michael R. Mattys
MapPoint & Access Dev
www.mattysconsulting.com

----- Original Message ----- 
From: "Kaup, Chester" <Chester_Kaup at kindermorgan.com>
To: "Access Developers discussion and problem solving" 
<accessd at databaseadvisors.com>
Sent: Wednesday, January 02, 2008 1:57 PM
Subject: Re: [AccessD] I need a better way to do this - looping


> Here is the solution I can up with. Not elegant but works. If someone
> has a better one enhance my skills.
>
>    Do Until Myds1.EOF
>        Select Case Myds1.Fields(4)
>            Case Is > 100
>                Myds1.MoveNext
>            Case Else
>                Exit Do
>        End Select
>    Loop
>    If Myds1.EOF Then
>        Myds1.Move -1
>        EarliestDate = Myds1.Fields(1)
>      Else
>        EarliestDate = Myds1.Fields(1)
>    End If
>
>    DaysAbove100 = Myds.Fields(1) - Myds1.Fields(1)




More information about the AccessD mailing list