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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Soting question on Query to form



 
 
Thread Tools Display Modes
  #1  
Old December 27th, 2006, 08:02 PM posted to microsoft.public.access.forms
Lou
external usenet poster
 
Posts: 129
Default Soting question on Query to form

Hello;

I want to add a menu a form with different sort by options, what would be
the best way to do this? They choose the data order and select a button to
run a report which sorts the data as they have specified thru a query.

Example:
Field choices: Date, Name, Address, Phone, zip
1. Date
2. Name
3. Addy
4. Phone
5. Zip

or

1. Zip
2. Name
3. Addy

and so on?

Thank you.
Lou

  #2  
Old December 27th, 2006, 10:39 PM posted to microsoft.public.access.forms
mscertified
external usenet poster
 
Posts: 835
Default Soting question on Query to form

Set up a form with however many combo boxes you need. Each combo box contains
the list of possible sort by fields. Have a SORT button to run the sort;
this button will open your form passing in openargs a string representing the
sort order. In your form open event, you unparse this string and use it to
set up the SQL for the record source of the form.

-Dorian

"LOU" wrote:

Hello;

I want to add a menu a form with different sort by options, what would be
the best way to do this? They choose the data order and select a button to
run a report which sorts the data as they have specified thru a query.

Example:
Field choices: Date, Name, Address, Phone, zip
1. Date
2. Name
3. Addy
4. Phone
5. Zip

or

1. Zip
2. Name
3. Addy

and so on?

Thank you.
Lou

 




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 02:03 AM.


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