Don't sort

G

Guest

Thanks for taking the time to read my question

I have a table that looks like the following

Sex Person1 Person2 Person3
M Bert Henry Garry
M 21 31 23
F June Jill Mary
F 24 25 21

I put the data into this table from another table just for this report

I want my report to group on Sex, and then show the data just as it is in
the table. However, Access insists on sorting the data so that the numbers
show first and the names second. If I put a sort order on Person1 then it
puts both name rows first, then the ages.

Can I turn off the auto sort at all?

Brad
 
D

Duane Hookom

Can't you sort first by Sex and then by Person1 DESC?

If you want to see records in a specific order (entered order is an order)
then you must have a value stored in a field or fields that describe that
order.
 
G

Guest

Thanks for the reply Duane.

My report has the persons name and under it their age. If I add sorting to
it, it gives me the names first, then all the ages

table:

Sex Person1 Person2 Person3
M Bert Henry Garry
M 21 31 23
M Jake Jon Jordan
M 32 39 47
F June Jill Mary
F 24 25 21
F Brenda Bertha Betty
F 13 19 17

Report Sorted Ascending on Person1, and Decending and Grouped on Sex will
give me:

Sex Person1 Person2 Person 3
M 21 31 23
M 32 39 47
M Bert Henry Garry
M Jake John Jordan
F 13 19 17
F 24 25 21
F Brenda Bertha Betty
F June Jill Mary

I need the report to look exactly like the table, just grouped on Sex.

If I don't sort on Person1 I get:

Sex Person1 Person2 Person3
M 21 31 23
M Bert Henry Garry
M 32 39 47
M Jake Jon Jordan
F 24 25 21
F June Jill Mary
F 13 19 17
F Brenda Bertha Betty


Thanks,

Brad
 
G

Guest

Solution:

I'm building the table in VBA using recordsets. The table has an autonumber,
so I'll just sort the records by the autonumber within the groups.

Brad
 
R

Rick B

Brad: Your table structure is all wrong. You can't store a person's name
in one record, and their age in a different record in a field called
"Person1". Each RECORD should pertain to one person or thing. You might
have a field for their name, and a sepaerate field for their age, and a
third for their gender.

You say you are creating this table from another table. Why? You should
QUERY your original table and filter the data to obtain what you ened for
the report.

Sounds like your table structure is horribly screwed up.

Why don't you post what your table structure looks like, what type of data
you are storing, and what results you are trying to get. Then we can help
you get your database normalised.

Rick B
 
D

Duane Hookom

I agree with Rick B. I think you are building tables with a spreadsheet
perspective. One word: "Stop".

I would rethink this structure before you get too far into development.
 
G

Guest

Hi Rick and Duane,

Thanks for the reply and the concern.

I realize my table is all messed up. It is only a temporary table that is
used to generate a report. A crosstab query would not solve my problem, so I
had to "flip" the data my self. I realize that I am saving Text and Numbers
in the same field.

There is no other way to make this work. I can post my db on a web site if
you want to download it to check it out. It is just a test db to make sure I
can do what I want, then I can apply it to my real db.

let me know, I have a web page (for my band), I can put it on that server
for you to download and have a look at.

Thanks again for replying.

Brad
 
D

Duane Hookom

It wouldn't make any difference to me if it was only a temporary table. I
would expect some values that would not make an assumption about the order
of the records or their contents.
 
R

Rick B

I agree with Duane, fix your structure.

I can think of no valid reason to ignore normalization. It only causes
problems later.

You are welcome to tell us what your data is and what you want to
accomplish. We can give you advice on how to organize it.


Rick B
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top