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

Sorting data



 
 
Thread Tools Display Modes
  #1  
Old March 17th, 2010, 12:43 AM posted to microsoft.public.access.tablesdbdesign
Rob H
external usenet poster
 
Posts: 35
Default 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  
Old March 17th, 2010, 01:12 AM posted to microsoft.public.access.tablesdbdesign
Steve[_77_]
external usenet poster
 
Posts: 1,017
Default 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  
Old March 17th, 2010, 01:19 AM posted to microsoft.public.access.tablesdbdesign
Allen Browne
external usenet poster
 
Posts: 11,706
Default 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  
Old March 17th, 2010, 03:39 PM posted to microsoft.public.access.tablesdbdesign
Fred
external usenet poster
 
Posts: 1,451
Default 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

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 10:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.