A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sorting Multiple Fields in Access



 
 
Thread Tools Display Modes
  #1  
Old July 30th, 2009, 12:27 AM posted to microsoft.public.access.tablesdbdesign
Ladypep13
external usenet poster
 
Posts: 6
Default 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  
Old July 30th, 2009, 12:32 AM posted to microsoft.public.access.tablesdbdesign
Duane Hookom
external usenet poster
 
Posts: 7,177
Default 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  
Old July 30th, 2009, 01:50 AM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default 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  
Old July 30th, 2009, 01:58 PM posted to microsoft.public.access.tablesdbdesign
CraigH
external usenet poster
 
Posts: 50
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:04 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.