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

Query will not sort



 
 
Thread Tools Display Modes
  #1  
Old February 24th, 2010, 05:20 PM posted to microsoft.public.access.gettingstarted
Lenee
external usenet poster
 
Posts: 14
Default Query will not sort

I have made a query and it will not sort one of my fields. I thought it was a
simple query but maybe not.

Field: Area, Sort Ascending
Field: OrderNumber, Sort Ascending
Field: Status, Criteria Like "*Y*"
Field: Week 1, Criteria Is Null

It will do everything except sort on the order number.


--
Lenee
  #2  
Old February 24th, 2010, 05:46 PM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Query will not sort

Lenee

Please post the SQL statement of your query.

?Are you saying that the query should sort on OrderNumber first? If so, why
is Area first?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Lenee" wrote in message
...
I have made a query and it will not sort one of my fields. I thought it was
a
simple query but maybe not.

Field: Area, Sort Ascending
Field: OrderNumber, Sort Ascending
Field: Status, Criteria Like "*Y*"
Field: Week 1, Criteria Is Null

It will do everything except sort on the order number.


--
Lenee



  #3  
Old February 24th, 2010, 05:47 PM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Query will not sort

Lenee

Also, it would help to know what kind of data (e.g., examples) are in [Area]
and [OrderNumber]...

.... and what YOU mean by "not sort" ... what specifically is happening (or
not).

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Lenee" wrote in message
...
I have made a query and it will not sort one of my fields. I thought it was
a
simple query but maybe not.

Field: Area, Sort Ascending
Field: OrderNumber, Sort Ascending
Field: Status, Criteria Like "*Y*"
Field: Week 1, Criteria Is Null

It will do everything except sort on the order number.


--
Lenee



  #4  
Old February 24th, 2010, 06:14 PM posted to microsoft.public.access.gettingstarted
John Spencer
external usenet poster
 
Posts: 7,815
Default Query will not sort

One possible reason for this is if you have used a lookup combo to be able to
select order number from a combobox on the table involved. In that case, the
sort may be on what is actually stored in the field and NOT on what is
displayed when looking at the query in datasheet view.



John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Jeff Boyce wrote:
Lenee

Also, it would help to know what kind of data (e.g., examples) are in [Area]
and [OrderNumber]...

... and what YOU mean by "not sort" ... what specifically is happening (or
not).

Regards

Jeff Boyce
Microsoft Access MVP

  #5  
Old February 24th, 2010, 07:09 PM posted to microsoft.public.access.gettingstarted
Lenee
external usenet poster
 
Posts: 14
Default Query will not sort

Jeff,

Here is the SQL statement. I had to make a new one but it is doing (or not
doing) the same thing.


-- SELECT CustomerT.CutArea, CustomerT.CutOrdNum, CustomerT.[2010 Status],
CustomerT.Cutwk1, CustomerT.Cutwk2
FROM CustomerT
WHERE (((CustomerT.[2010 Status]) Like "*Y*") AND ((CustomerT.Cutwk2) Is
Null))
ORDER BY CustomerT.CutArea, CustomerT.CutOrdNum;


What I need the query to do is sort
First on Area then on order Number.

What I mean by not sorting is, the query will not put the order number in
numerical order.

I am making route sheets for my employees and we have 17 different routes.
Then within each route there is an order number so the employee knows where
to go first and then down the list.

Area is a text field in the table and lookup. Data entered is: an, bf, bu,
cn. Again there are 17.

The order number is a number field: field size, Double, Format: General
Number.
Data entered is numbers 100 to 1000.

Not sure if I explained well, if not just ask. I am just really fustrated at
this time.

Lenee


"Lenee" wrote:

I have made a query and it will not sort one of my fields. I thought it was a
simple query but maybe not.

Field: Area, Sort Ascending
Field: OrderNumber, Sort Ascending
Field: Status, Criteria Like "*Y*"
Field: Week 1, Criteria Is Null

It will do everything except sort on the order number.


--
Lenee

  #6  
Old February 24th, 2010, 07:28 PM posted to microsoft.public.access.gettingstarted
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Query will not sort

It should order by CutArea first then CutOrdNum next. If CutArea is a lookup,
that might be the problem as John mentioned.

It might help if you post and example of the data, maybe a little of the
CutArea and CutOrdNum fields so we can see what the problem looks like.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Lenee" wrote:

Jeff,

Here is the SQL statement. I had to make a new one but it is doing (or not
doing) the same thing.


-- SELECT CustomerT.CutArea, CustomerT.CutOrdNum, CustomerT.[2010 Status],
CustomerT.Cutwk1, CustomerT.Cutwk2
FROM CustomerT
WHERE (((CustomerT.[2010 Status]) Like "*Y*") AND ((CustomerT.Cutwk2) Is
Null))
ORDER BY CustomerT.CutArea, CustomerT.CutOrdNum;


What I need the query to do is sort
First on Area then on order Number.

What I mean by not sorting is, the query will not put the order number in
numerical order.

I am making route sheets for my employees and we have 17 different routes.
Then within each route there is an order number so the employee knows where
to go first and then down the list.

Area is a text field in the table and lookup. Data entered is: an, bf, bu,
cn. Again there are 17.

The order number is a number field: field size, Double, Format: General
Number.
Data entered is numbers 100 to 1000.

Not sure if I explained well, if not just ask. I am just really fustrated at
this time.

Lenee


"Lenee" wrote:

I have made a query and it will not sort one of my fields. I thought it was a
simple query but maybe not.

Field: Area, Sort Ascending
Field: OrderNumber, Sort Ascending
Field: Status, Criteria Like "*Y*"
Field: Week 1, Criteria Is Null

It will do everything except sort on the order number.


--
Lenee

  #7  
Old February 26th, 2010, 09:38 PM posted to microsoft.public.access.gettingstarted
Fred
external usenet poster
 
Posts: 1,451
Default Query will not sort

If you are viewing the data in the query, you might have a sort in the view
that is overriding the query's sorts.

Try Records - Remove Filter/Sort

Fred


 




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 05:26 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.