changes to all records in one rec set based on position in another rec set 
Author Message
 changes to all records in one rec set based on position in another rec set

I have the following code for two tables.

Public Function StartFirst()

    Dim rstTeamPoints As Recordset
    Dim rstIndivPts As Recordset
    Dim dbs As Database
    Dim intI As Integer

    Set dbs = CurrentDb()
    Set rstTeamPoints = dbs.OpenRecordset("qryTeamTotal")
    Set rstIndivPts = dbs.OpenRecordset("qryRace1StartOrder")
    intI = 1

        Do While Not rstTeamPoints.EOF

            Do While Not rstIndivPts.EOF
                'If rstTeamPoints.EOF Then rstTeamPoints.MoveFirst
                'If [rstIndivPts]![StartOrder] Then
                If [rstIndivPts]![Team] = [rstTeamPoints]![TeamName]
                [rstIndivPts]![StartOrder] = intI
                intI = intI + 1
                Else: rstIndivPts.MoveNext
                End If

End Function
rstTeamPoints has 6 records. they are in the order of  team finish. I
have to go through the rstIndivPts and assign a starting position. This
table has 335 records now but will change with time. My code stops after

the first time through as it runs out of records in rstTeamPoints(6) How

can i keep it going to assign a starting number field to all 335
records.. The starting times in order go by fastest team matches to the
fastest racer from that team
2nd fastest team 2nd fastest racer ... 1st fastest team 7th fastest
racer... 2nd fastest team 8th fastestest racer and through people who we
not in participatein the last event with no position.

Sat, 15 Jul 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. New Rec with Data Based on Previous Rec's Data

2. New Rec with previous Rec data

3. Perform a go to new rec w/ retaining some info from prev rec

4. Move to newrecord adds rec to db, but cant move to new rec

5. New Rec with previous Rec data

6. Setting up Outlook to send/rec email through Lan

7. Rec. set lost

8. Rec. sets

9. setting focus after adding a rec

10. setting up outlook to send/rec mail through lan

Powered by phpBB® Forum Software © phpBB Group