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
|
|||
|
|||
Sorting data
I have a table named Items, in this table the items are defined by Name,
Size, and Format. When first setting up the table I added a few of my items to get the process going. I then created a query based on this table to sort by name, size, and format. When creating a sort order in the query by Name(Ascending), Size(descending), and Format(Ascending) the result works perfectly. However, after adding new items either through the Table or Items Form I created, the sort works for Name and Format but the Size is not following the sort order(new itemssize is actually being ordered in reverse while the original entrys are being sorted properly), short of re-creating the whole Items table I have tried deleting the query and starting over, clearing all sorts in the query and doing a refresh and save and then re-creating the sort orders with the same results. This is something basic but I can't seem to figure it out. |
#2
|
|||
|
|||
Sorting data
You were given the solution when you posted on 3/13 but you chose to follow
Arno R and Visio John. So now.... Get Lost !!!! Steve "Rob H" wrote in message ... I have a table named Items, in this table the items are defined by Name, Size, and Format. When first setting up the table I added a few of my items to get the process going. I then created a query based on this table to sort by name, size, and format. When creating a sort order in the query by Name(Ascending), Size(descending), and Format(Ascending) the result works perfectly. However, after adding new items either through the Table or Items Form I created, the sort works for Name and Format but the Size is not following the sort order(new itemssize is actually being ordered in reverse while the original entrys are being sorted properly), short of re-creating the whole Items table I have tried deleting the query and starting over, clearing all sorts in the query and doing a refresh and save and then re-creating the sort orders with the same results. This is something basic but I can't seem to figure it out. |
#3
|
|||
|
|||
Sorting data
What data type is your Size field?
You may need to use a Number field rather than a Text field. Text fields sort character-by-character. That means 10 sorts before 8, because the first character (a 1) comes before the first character of the other value (an 8.) BTW, you may want to avoid using reserved words as field names. That includes: - Name (known to give problems in forms and reports, where Access can mistake it for the Name of the form/report), - Format (a field property), and - Size (reserved in JET SQL) For a complete list of the names to avoid when designing your tables, refer to: http://allenbrowne.com/Ap****ueBadWord.html -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Rob H" wrote in message ... I have a table named Items, in this table the items are defined by Name, Size, and Format. When first setting up the table I added a few of my items to get the process going. I then created a query based on this table to sort by name, size, and format. When creating a sort order in the query by Name(Ascending), Size(descending), and Format(Ascending) the result works perfectly. However, after adding new items either through the Table or Items Form I created, the sort works for Name and Format but the Size is not following the sort order(new itemssize is actually being ordered in reverse while the original entrys are being sorted properly), short of re-creating the whole Items table I have tried deleting the query and starting over, clearing all sorts in the query and doing a refresh and save and then re-creating the sort orders with the same results. This is something basic but I can't seem to figure it out. |
#4
|
|||
|
|||
Sorting data
Plus a couple of basic things I'm sure you already checked.
Make sure your only sorts are in the Query grid (or SQL) Make you haven't used the "A-Z" sort button (or do records-Remove Filter/Sort) Order the columns per your desired sort hierarchy. |
Thread Tools | |
Display Modes | |
|
|