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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Need help sorting a query



 
 
Thread Tools Display Modes
  #1  
Old April 23rd, 2010, 11:51 PM posted to microsoft.public.access.queries
Iram
external usenet poster
 
Posts: 122
Default Need help sorting a query

Hello,

I have a combobox that is called "Category". This combobox runs a query that
has two fields "Category" and "Team" from a table.

I need to sort the query by Team first then by Category.

The problem is when I sort the query like the below it doesn't sort
correctly because I need the combox to populate the field with the Category
selection....

Category Team
No Sorting Ascending

When I run the query described above it sorts the Team fine however the
Category sorts all messed up.

Can you help with this problem and tell me how to correctly do this?



Thanks.
Iram/mcp
  #2  
Old April 24th, 2010, 12:35 AM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Need help sorting a query

This combobox runs a query that has two fields "Category" and "Team" from a
table.
Post the query SQL by open in design view, click on VIEW - SQL View,
highlight all, copy, and paste in a post.

--
Build a little, test a little.


"Iram" wrote:

Hello,

I have a combobox that is called "Category". This combobox runs a query that
has two fields "Category" and "Team" from a table.

I need to sort the query by Team first then by Category.

The problem is when I sort the query like the below it doesn't sort
correctly because I need the combox to populate the field with the Category
selection....

Category Team
No Sorting Ascending

When I run the query described above it sorts the Team fine however the
Category sorts all messed up.

Can you help with this problem and tell me how to correctly do this?



Thanks.
Iram/mcp

  #3  
Old April 24th, 2010, 12:46 AM posted to microsoft.public.access.queries
Iram
external usenet poster
 
Posts: 122
Default Need help sorting a query

Here you go....

SELECT tbl_Category.Category, tbl_Category.Classification,
tbl_Category.CountWhatCountsStat
FROM tbl_Category
ORDER BY tbl_Category.Classification, tbl_Category.CountWhatCountsStat;





"KARL DEWEY" wrote:

This combobox runs a query that has two fields "Category" and "Team" from a

table.
Post the query SQL by open in design view, click on VIEW - SQL View,
highlight all, copy, and paste in a post.

--
Build a little, test a little.


"Iram" wrote:

Hello,

I have a combobox that is called "Category". This combobox runs a query that
has two fields "Category" and "Team" from a table.

I need to sort the query by Team first then by Category.

The problem is when I sort the query like the below it doesn't sort
correctly because I need the combox to populate the field with the Category
selection....

Category Team
No Sorting Ascending

When I run the query described above it sorts the Team fine however the
Category sorts all messed up.

Can you help with this problem and tell me how to correctly do this?



Thanks.
Iram/mcp

  #4  
Old April 24th, 2010, 01:17 AM posted to microsoft.public.access.queries
PieterLinden via AccessMonster.com
external usenet poster
 
Posts: 307
Default Need help sorting a query

Iram wrote:
Here you go....

SELECT tbl_Category.Category, tbl_Category.Classification,
tbl_Category.CountWhatCountsStat
FROM tbl_Category
ORDER BY tbl_Category.Classification, tbl_Category.CountWhatCountsStat;

I need to sort the query by Team first then by Category.

Then why not
ORDER BY tbl_category.Team, tbl_Category.Category

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/201004/1

 




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:15 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.