Prev: A "push" function to produce an email on an event
Next: Creation of New Database and Exporting Tables from an existing Dat
From: Rob H on 16 Mar 2010 19:43 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 items>size 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.
From: Steve on 16 Mar 2010 20:12 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" <RobH(a)discussions.microsoft.com> wrote in message news:E16A2F76-A3E8-4228-B646-7309086FCD5F(a)microsoft.com... >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 items>size 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.
From: Allen Browne on 16 Mar 2010 20:19 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/AppIssueBadWord.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" <RobH(a)discussions.microsoft.com> wrote in message news:E16A2F76-A3E8-4228-B646-7309086FCD5F(a)microsoft.com... > 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 items>size 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.
From: Fred on 17 Mar 2010 10:39
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. |