Sort a group

  • Thread starter Thread starter bbypookins
  • Start date Start date
B

bbypookins

I have a report with a group which has a row source of

SELECT tblDivision.Division FROM tblDivision ORDER BY tblDivision.Prefix;

It's supposed to be sorting by the field "Prefix" which is in the
tblDivision, but it's sorting alphabetically by the field "Division". What am
I doing wrong?
 
I have a report with a group which has a row source of

SELECT tblDivision.Division FROM tblDivision ORDER BY tblDivision.Prefix;

It's supposed to be sorting by the field "Prefix" which is in the
tblDivision, but it's sorting alphabetically by the field "Division". What am
I doing wrong?

Any sort order in the query is irrelevant to the sort order of the
report.
To sort the report, use the report's Sorting and Grouping dialog.
In Report Design View, click on
View + Sorting and Grouping
 
Okay, but it only gives the option of alphebetizing it. I need to sort that
group by a number that isn't even in the report. Is that possible?
 
Okay, but it only gives the option of alphebetizing it. I need to sort that
group by a number that isn't even in the report. Is that possible?

You can write an expression in the Field/Expression column, i.e.
=Left([SomeField],4)

However, if the table includes a field named [Prefix} why not simply
include it in the record source query? Or create a new column in the
query and use the expression there.
Now you can use that new query field as the field to sort the report
on in Sorting and Grouping.
 
Back
Top