If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Sorting Multiple Fields in Access
I have a membership database that I need to be able to sort by multiple
fields and merge into a Microsoft Word document for postal sorting purposes. I need to be able to sort by my own set postal code (not same as zip code) and then by zip code. I can do this in the table if i move the postal code field to the left of the zip code field then select both and sort but once I select recipients and it brings up a recipients table, the sort order is different. I can then only sort by PostalCode field OR ZipCode field. I've tried to figure out other ways to accomplish what I need by using queries and even creating new tables but once I merge the sort order has changed. How can I sort by one field then another then even another if necessary when I merge? Thanks in advance for any help. |
#2
|
|||
|
|||
Sorting Multiple Fields in Access
The order your fields appear in the SELECT clause doesn't have to be the same
as the order your fields appear in the ORDER BY clause. -- Duane Hookom Microsoft Access MVP "Ladypep13" wrote: I have a membership database that I need to be able to sort by multiple fields and merge into a Microsoft Word document for postal sorting purposes. I need to be able to sort by my own set postal code (not same as zip code) and then by zip code. I can do this in the table if i move the postal code field to the left of the zip code field then select both and sort but once I select recipients and it brings up a recipients table, the sort order is different. I can then only sort by PostalCode field OR ZipCode field. I've tried to figure out other ways to accomplish what I need by using queries and even creating new tables but once I merge the sort order has changed. How can I sort by one field then another then even another if necessary when I merge? Thanks in advance for any help. |
#3
|
|||
|
|||
Sorting Multiple Fields in Access
On Wed, 29 Jul 2009 16:27:01 -0700, Ladypep13
wrote: I have a membership database that I need to be able to sort by multiple fields and merge into a Microsoft Word document for postal sorting purposes. I need to be able to sort by my own set postal code (not same as zip code) and then by zip code. I can do this in the table if i move the postal code field to the left of the zip code field then select both and sort but once I select recipients and it brings up a recipients table, the sort order is different. I can then only sort by PostalCode field OR ZipCode field. I've tried to figure out other ways to accomplish what I need by using queries and even creating new tables but once I merge the sort order has changed. How can I sort by one field then another then even another if necessary when I merge? Thanks in advance for any help. Are you trying to do the mail merge *with a table*? If so, don't! Tables have no defined sort order. Instead create a Query sorting by as many fields as you wish... and base the mail merge on the Query. By going into SQL view you can, as Duane says, select fields in one order for the mail merge and sort in some other order. -- John W. Vinson [MVP] |
#4
|
|||
|
|||
Sorting Multiple Fields in Access
"John W. Vinson" wrote: .... Instead create a Query sorting by as many fields as you wish... and base the mail merge on the Query. By going into SQL view you can, as Duane says, select fields in one order for the mail merge and sort in some other order. -- John W. Vinson [MVP] Or DONT go into the SQL view (For a novice 95% of what you need to do in a query can be done in the GUI - and who wants to type when you can use a few mouse clicks) If you need the fields in a specific order you can do that and then add the fields you wish to sort with at the end, in the order that you wish to sort them. Just uncheck the show box so you don't duplicate names. After you save this at least one of the sortings (*) will be put under the actual field. And if you did it in the SQL view you would see the same result. Craig * For my AR side - unless you use a compound entry as the first sorting group. |
Thread Tools | |
Display Modes | |
|
|