Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / May 2008

Tip: Looking for answers? Try searching our database.

Sorting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rfdjr1@optonline.net - 23 May 2008 01:24 GMT
Using Access 2000, is there a way to sort on multiple fields at the same time.
Here's what I want to do: I have a simple, three field database of CD's. The
fields are ARTIST, ALBUM and CATEGORY. I know I can sort any one of the fields
by itself. What I'd like to do is sort the ARTIST alphabetically and also have
the ALBUMs by that artist list alphabetically. I have a book and the online help
files but don't see how I can do it. I appreciate any help. Thanks.
Fred Zuckerman - 23 May 2008 01:52 GMT
> Using Access 2000, is there a way to sort on multiple fields at the same
> time.
[quoted text clipped - 7 lines]
> online help
> files but don't see how I can do it. I appreciate any help. Thanks.

I assume you are asking how to sort from within a form. There are a couple
of methods.

1. From Datasheet view, move the two columns into the desired order (left to
right). Then highlight both columns. Then click the A-Z button. This is also
the method you'd use if you're sorting from the table.

2. From Form view, create a button and put this code in the Click_Event:
Me.OrderBy = "Artist, Album"
Me.OrderByOn = True

I have often wondered if there is a method that can be used from Form view
without a button, or switching to datasheet view, sorting, then switching
back.
Fred Zuckerman
rfdjr1@optonline.net - 23 May 2008 02:53 GMT
>> Using Access 2000, is there a way to sort on multiple fields at the same
>> time.
[quoted text clipped - 23 lines]
>back.
>Fred Zuckerman

That was simple enough. Don't know why I didn't think to try hilighting both
columns before. Thanks much.
fredg - 23 May 2008 01:52 GMT
> Using Access 2000, is there a way to sort on multiple fields at the same time.
> Here's what I want to do: I have a simple, three field database of CD's. The
> fields are ARTIST, ALBUM and CATEGORY. I know I can sort any one of the fields
> by itself. What I'd like to do is sort the ARTIST alphabetically and also have
> the ALBUMs by that artist list alphabetically. I have a book and the online help
> files but don't see how I can do it. I appreciate any help. Thanks.

Sort where? On a form? On a Report?
On a form?
Create a query containing all of the fields you wish to display on
your form.
Access sorts multiple columns in left to right order, so...
place the Artist column to the left of the Album column.
Set the Sort row for these 2 columns to Ascending
Save the query.
Make this query the record source for the form.

On a Report?
Open the report in Design View.
Click on View + Sorting and Grouping.
In the Field/Expression column enter the Artist field.
Below it enter the Album field
Save the dialog.

The report data will now sort in Artist, Album order.
Signature

Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.