Re: Access database records not sorted

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Mike (anonymous_at_discussions.microsoft.com)
Date: 06/12/04

  • Next message: Robbie: "Re: How does one select bulleted text?"
    Date: Sat, 12 Jun 2004 13:40:14 -0700
    
    

    I am not sure how to specify the sort order for a field.
    When I right click on the design view of the table and
    click properties it says "OrderBy Rolodex.company". Is
    there somewhere else that I need to specify a sort order?

    Mike

    >-----Original Message-----
    >Hi Mike
    >
    >This is really an Access problem an not a Word problem.
    You need to ensure that the
    >table/query you are using has specified the sort order
    for the field you want returned in
    >alphabetical order. Just sorting the data in the DB
    wont do it as virtual record sets are
    >created using the order specified in the database schema.
    >
    >HTH + Cheers - Peter
    >
    >
    >"Mike" <anonymous@discussions.microsoft.com>, said:
    >
    >>I am writing a VBA macro in Word that opens an Access
    >>database called Rolodex. I intend to be able to insert
    an
    >>address into the Word document from the database. The
    >>macro is also able to create a new access record,
    delete
    >>a record, or edit a record.
    >>
    >>I am listing the Company name in a ListBox for the user
    >>to select from. When I add a new record to the access
    >>database it is not sorted properly instead it is listed
    >>at the top of the ListBox.
    >>
    >>To sort the data I opened up the database using Access
    >>and sorted the list by Company name. Access is then
    >>sorted correctly but the next time I run the Word macro
    >>and the ListBox is populated with the Company names it
    is
    >>still not sorted properly. The new records are still
    >>listed at the top of the ListBox even though Access is
    >>sorted correctly.
    >>
    >>Why is Word not listing the Company names in the same
    >>order as Access?
    >>
    >>How can I get the Company names listed alphabetically
    in
    >>the Word ListBox?
    >>
    >>Also how can I sort the Access database by Company name
    >>from the Word VBA macro so that I do not have to open
    >>Access and sort the data each time a new record is
    added?
    >>
    >>Mike
    >
    >.
    >


  • Next message: Robbie: "Re: How does one select bulleted text?"

    Relevant Pages

    • Re: Case sensitive replace query and international sorting
      ... the option is NEW database sort order. ... create after you set this option will have the sort order specified. ... "Running Microsoft Access 2000" ... > Although the query works, for every replacement i get an error saying: ...
      (microsoft.public.access.queries)
    • Re: Case sensitive replace query and international sorting
      ... When I was importing with the wizard, I tried different settings for code ... created a new database, created a test table with test records, and as I ... > create after you set this option will have the sort order specified. ... >> capital letter can be anywhere, not just at the beggining of the string. ...
      (microsoft.public.access.queries)
    • Re: Case sensitive replace query and international sorting
      ... "Microsoft Office Access 2003 Inside Out" ... > created a new database, created a test table with test records, and as I ... > "John Viescas" wrote in message ... >> create after you set this option will have the sort order specified. ...
      (microsoft.public.access.queries)
    • Re: Option Compare Database
      ... I think it came from non-unicode time, in Access 97 and before we had to set database sort order in options to russian, else we got wrong sort order. ... And Option Compare Text based on system locale. ...
      (microsoft.public.access.modulesdaovba)
    • RE: Microsoft Query Criteria Sort Order
      ... based on whats in cache and how the leaf level of database is read. ... Sometimes they need to set criteria for a field and do so by ... to do with the sort order collation of the database. ... that it is a must that these values be in sorted order, ...
      (microsoft.public.excel)