I have a sorting problem

  • Thread starter Thread starter BabyATX13 via AccessMonster.com
  • Start date Start date
B

BabyATX13 via AccessMonster.com

I have a table that looks up CompanyName, in alphabetical order, using a
query. Query consists of CompanyID (Number) & CompanyName (Text), in that
order, sort ascending by CompanyName. Query works fine for tables and forms
combo boxes and the like. But when I try to use the same Query, or field from
a table that accesses the query, in a report the Company Names are sorted
ascending by CompanyID instead. How can I fix this without changing the table
data? (Table is FULL of data to much to change manually.)

Thank you,
KB
 
KB,
The sorting in a query that is used as the RecordSource of a report is
"overridden" by the Sorting and Grouping values of the report.
Set up the sorting scheme you want in the report S&G dialog box, and that
should do the trick.

--
hth
Al Camp
Candia Computer Consulting - Candia NH

http://home.comcast.net/~cccsolutions
 
Sorry Al that doesn't work either, I have had it set up to do this in the
report and it won't work I am really stumped here.
***********************************************
Sorting and Grouping

Field/Expression Sort Order

CompanyName Ascending
Date Ascending
************************************************
The report has been set that way all along

I am using a query to open the report and display data because
When button for report is clicked user is asked for start and end date
(Ex....Between [Enter Start Date] And [Enter End Date] in date field of query)

CompanyName field comes from a table, but in the table the CompanyName is a
number field, because the value is looked up in a form from another query
(previously listed). I realize this is probably why the report lists the
company names in the order they were entered not alphabetically but I don't
know how to change it without messing up the table data.

Please help!!!!
Thanks
KB




Al said:
KB,
The sorting in a query that is used as the RecordSource of a report is
"overridden" by the Sorting and Grouping values of the report.
Set up the sorting scheme you want in the report S&G dialog box, and that
should do the trick.
I have a table that looks up CompanyName, in alphabetical order, using a
query. Query consists of CompanyID (Number) & CompanyName (Text), in that
[quoted text clipped - 9 lines]
Thank you,
KB
 
That's pretty confusing! CompanyName should be a text field with the
name of the company, not a number. Your Company table should have a key
field like CompanyID that contains a unique number for each company, and
that key field should be the link field.
Please provide an example report output... just a few lines to show it
appears, and another example of how you want it to appear.
Provide field names, and what values are stored there.
If you have a field that does contain a real "text" Company Name, use
that in the S&G instead of the numeric CompanyName field.
Be clear about the fields you're using, what you have now, and what you
want...
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

BabyATX13 via AccessMonster.com said:
Sorry Al that doesn't work either, I have had it set up to do this in the
report and it won't work I am really stumped here.
***********************************************
Sorting and Grouping

Field/Expression Sort Order

CompanyName Ascending
Date Ascending
************************************************
The report has been set that way all along

I am using a query to open the report and display data because
When button for report is clicked user is asked for start and end date
(Ex....Between [Enter Start Date] And [Enter End Date] in date field of
query)

CompanyName field comes from a table, but in the table the CompanyName is
a
number field, because the value is looked up in a form from another query
(previously listed). I realize this is probably why the report lists the
company names in the order they were entered not alphabetically but I
don't
know how to change it without messing up the table data.

Please help!!!!
Thanks
KB




Al said:
KB,
The sorting in a query that is used as the RecordSource of a report is
"overridden" by the Sorting and Grouping values of the report.
Set up the sorting scheme you want in the report S&G dialog box, and
that
should do the trick.
I have a table that looks up CompanyName, in alphabetical order, using a
query. Query consists of CompanyID (Number) & CompanyName (Text), in
that
[quoted text clipped - 9 lines]
Thank you,
KB
 
Ok, so here goes.

Company table has CustomerID (AutoNumber), CompanyName (Text), Address, City,
State, Zip, Etc…..

Customer Query has CustomerID, CompanyName.

Report Query gets information from another table. Never mind I just answered
my own question.

I had to put the Customer Table in my Report Query and use the CompanyName
(Text) field from the Customers Table instead of using the CompanyName(Number)
field from the other table I was using in the Report Query. Thank you for
helping me figure this one out.
KB


Al said:
That's pretty confusing! CompanyName should be a text field with the
name of the company, not a number. Your Company table should have a key
field like CompanyID that contains a unique number for each company, and
that key field should be the link field.
Please provide an example report output... just a few lines to show it
appears, and another example of how you want it to appear.
Provide field names, and what values are stored there.
If you have a field that does contain a real "text" Company Name, use
that in the S&G instead of the numeric CompanyName field.
Be clear about the fields you're using, what you have now, and what you
want...
Sorry Al that doesn't work either, I have had it set up to do this in the
report and it won't work I am really stumped here.
[quoted text clipped - 38 lines]
 
That's exactly what you should be doing. Your only storing the ID for the
company because you can always "re-associate" to the Name in your Customers
table... whenever you need it.
Good deal! And good for you for working it out...
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

BabyATX13 via AccessMonster.com said:
Ok, so here goes.

Company table has CustomerID (AutoNumber), CompanyName (Text), Address,
City,
State, Zip, Etc...

Customer Query has CustomerID, CompanyName.

Report Query gets information from another table. Never mind I just
answered
my own question.

I had to put the Customer Table in my Report Query and use the CompanyName
(Text) field from the Customers Table instead of using the
CompanyName(Number)
field from the other table I was using in the Report Query. Thank you for
helping me figure this one out.
KB


Al said:
That's pretty confusing! CompanyName should be a text field with the
name of the company, not a number. Your Company table should have a key
field like CompanyID that contains a unique number for each company, and
that key field should be the link field.
Please provide an example report output... just a few lines to show it
appears, and another example of how you want it to appear.
Provide field names, and what values are stored there.
If you have a field that does contain a real "text" Company Name, use
that in the S&G instead of the numeric CompanyName field.
Be clear about the fields you're using, what you have now, and what you
want...
Sorry Al that doesn't work either, I have had it set up to do this in
the
report and it won't work I am really stumped here.
[quoted text clipped - 38 lines]
Thank you,
KB
 
Back
Top