Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting in Access

Status
Not open for further replies.

WannaLearn

Programmer
Jul 10, 2001
210
US
Hello, I have 8 fields (fields A-H) in my access file, when I try to sort one field in ascending order, lets say field D, only A,B,C, and D sort ascending, the other fields are left untouched.
I thought that maybe the page-break might be causing that to happen, so I changed the page-break to include all fields. Now one page when printed will print fields A-H. But still when I try to sort only A-D sort and nothing happens in the other fields.
How do I fix this?
Thank-you.
 
Let's say I have the following:

Field1 Field2 Field3 Field4
a 2 d apples
b 3 c cats
c 1 b bananas
d 4 a dogs

if i have the following SQL:

SELECT * FROM TABLE ORDER BY FIELD3

my results will be

Field1 Field2 Field3 Field4
d 4 a dogs
c 1 b bananas
b 3 c cats
a 2 d apples

so field3 is in order and the rest of the record goes with it.

If I try:
SELECT * FROM TABLE ORDER BY FIELD1

my results would look like the original data because Field1 is in order (a,b,c,d)

If I do:

SELECT * FROM TABLE ORDER BY FIELD4

then i would have:
Field1 Field2 Field3 Field4
a 2 d apples
c 1 b bananas
b 3 c cats
d 4 a dogs

So, it's hard to understand how you are only sorting on one field, but are seeing the other fields sorted as well.

Why don't you post the SQL that you are using and maybe someone can figure it out with a little more information.
You mention the page breaks, is this in a report?

Does the query you are basing the report from show the correct order?

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top