Re: Access database records not sorted
From: Mike (anonymous_at_discussions.microsoft.com)
Date: 06/12/04
- Previous message: Alder: "Re: Document_Close event problem"
- In reply to: Peter Hewett: "Re: Access database records not sorted"
- Next in thread: Peter Hewett: "Re: Access database records not sorted"
- Reply: Peter Hewett: "Re: Access database records not sorted"
- Messages sorted by: [ date ] [ thread ]
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
>
>.
>
- Previous message: Alder: "Re: Document_Close event problem"
- In reply to: Peter Hewett: "Re: Access database records not sorted"
- Next in thread: Peter Hewett: "Re: Access database records not sorted"
- Reply: Peter Hewett: "Re: Access database records not sorted"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|