adnanced record sorting

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marc

    #1

    adnanced record sorting

    From: Marc - view profile
    Date: Fri 15 Dec 2006 10:48
    Email: "Marc" <marc_cro...@ho tmail.com>
    Groups: microsoft.publi c.vb.general.di scussion
    Not yet ratedRating:
    show options
    Reply | Reply to Author | Forward | Print | Individual Message | Show
    original | Remove | Report Abuse | Find messages by this author


    Hi the below code looks through a query and creates a point on a map
    for each record.

    However rather than just going through each record, I need to do a kind

    of secondary sort on the query. For example...there may be 100 records
    in the query, but 5 different groups of records (with 20 records in
    each group. So rathe than look through all 100 records I need to look
    through the first 20...then chnage the colour of the point and look
    through the next 20 on so on.


    The data looks like...


    route 1 - citywatford
    route 1 - city maidenhead
    route2 - city birminihgam
    route 2 - city london
    route 3 ...etc. etc.


    and it is the route number i want to group by.


    The route numbers change each time the program is run also


    Anyone who can help?????? Thanks in advance


    Marc
    ------------------------------------------------------------------------



    Set Recordset = CurrentDb.OpenR ecordset("SELEC T * FROM QueryRoutes;")
    If Recordset.Recor dCount 0 Then
    While Not Recordset.EOF
    i = i + 1
    ReDim Preserve objLoc2(1 To i)
    Set objLoc2(i) = objMap.FindAddr essResults(Reco rdset!Address,
    Recordset!City, , , Recordset!Posta l_code, geoCountryUnite dKingdom)(1)
    Set objPin = objMap.AddPushp in(objLoc2(i), Recordset!Addre ss)
    Recordset.MoveN ext
    Wend
    End If

  • Cor Ligthert [MVP]

    #2
    Re: adnanced record sorting

    Marc,

    Why not use DotNet code instead pre DotNet solutions.

    The recordset is not from this time anymore, and therefore you get less and
    less answers on your questions. There are very few people (including me)
    interested to find a solution for a recordset problem..

    Cor

    "Marc" <marc_crosby@ho tmail.comschree f in bericht
    news:1166179773 .774234.221050@ 80g2000cwy.goog legroups.com...
    From: Marc - view profile
    Date: Fri 15 Dec 2006 10:48
    Email: "Marc" <marc_cro...@ho tmail.com>
    Groups: microsoft.publi c.vb.general.di scussion
    Not yet ratedRating:
    show options
    Reply | Reply to Author | Forward | Print | Individual Message | Show
    original | Remove | Report Abuse | Find messages by this author
    >
    >
    Hi the below code looks through a query and creates a point on a map
    for each record.
    >
    However rather than just going through each record, I need to do a kind
    >
    of secondary sort on the query. For example...there may be 100 records
    in the query, but 5 different groups of records (with 20 records in
    each group. So rathe than look through all 100 records I need to look
    through the first 20...then chnage the colour of the point and look
    through the next 20 on so on.
    >
    >
    The data looks like...
    >
    >
    route 1 - citywatford
    route 1 - city maidenhead
    route2 - city birminihgam
    route 2 - city london
    route 3 ...etc. etc.
    >
    >
    and it is the route number i want to group by.
    >
    >
    The route numbers change each time the program is run also
    >
    >
    Anyone who can help?????? Thanks in advance
    >
    >
    Marc
    ------------------------------------------------------------------------
    >
    >
    >
    Set Recordset = CurrentDb.OpenR ecordset("SELEC T * FROM QueryRoutes;")
    If Recordset.Recor dCount 0 Then
    While Not Recordset.EOF
    i = i + 1
    ReDim Preserve objLoc2(1 To i)
    Set objLoc2(i) = objMap.FindAddr essResults(Reco rdset!Address,
    Recordset!City, , , Recordset!Posta l_code, geoCountryUnite dKingdom)(1)
    Set objPin = objMap.AddPushp in(objLoc2(i), Recordset!Addre ss)
    Recordset.MoveN ext
    Wend
    End If
    >

    Comment

    Working...