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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|