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. Copy record from recordset to a new rec of same set

2. Audio rec+I/O rec: how ?

3. what is wrong ? I want set rec.activeconnection

4. i want set rec.activeconnection to connection from com+

5. converting a varible length record to a fixed length rec

6. ADO, Record Set Positioning - SQL - Browse Records

7. Procedure with 2 record sets one select, one update

8. How to set Bindingcontext().position based on combo box

9. Setting MousePointer based on screen position

10. Record Set Guru's - Can't Create Record Set error 429

11. Record Set Guru's - Can't Create Record Set error 429

12. Change Rec Set Filter doesn't update immediatly???


Powered by phpBB® Forum Software