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 / Forms / December 2007

Tip: Looking for answers? Try searching our database.

Offering a sorting choice

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Linda - 07 Dec 2007 16:06 GMT
I am attempting to make it easy for users to open a query by offering two
choices on sorting, by either Grant or Unit ID.  I've created a form to do
this, but I'm not sure of the language I need to make this work.  I already
have a parameter query set up that asks for the State, but this OR business
is confusing.

Any help is appreciated!

Linda
Klatuu - 07 Dec 2007 16:26 GMT
Open your query in design view and add an Order By clause something like this:

ORDER BY IIf([Enter Sort]="Grant",[Grant],[UnitID]);

It will prompt for a sort order and then sort on what the user entered.

My preferred way; however, is to use a combo box on a form with the valid
selections and use that in the query:
ORDER BY Forms!MyFormName!MyComboName;
Signature

Dave Hargis, Microsoft Access MVP

> I am attempting to make it easy for users to open a query by offering two
> choices on sorting, by either Grant or Unit ID.  I've created a form to do
[quoted text clipped - 5 lines]
>
> Linda
Linda - 07 Dec 2007 17:15 GMT
Would I put this clause in the Order By area in the Properties box?  If so,
it didn't prompt for the sort order.

Linda

> Open your query in design view and add an Order By clause something like this:
>
[quoted text clipped - 15 lines]
> >
> > Linda
Klatuu - 07 Dec 2007 17:24 GMT
The best way to do this is open the query in design view, then switch to SQL
view, and add the code to the end of the sql statement.
Signature

Dave Hargis, Microsoft Access MVP

> Would I put this clause in the Order By area in the Properties box?  If so,
> it didn't prompt for the sort order.
[quoted text clipped - 20 lines]
> > >
> > > Linda
 
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.