Lookup's autokey value, not text value is being used for sort

G

Guest

My report is sorting by the numeric autokey value, not the text value of a
particular lookup field, and I want to fix it to sort alphabetically by the
text value. I am using the "sorting and grouping" and it is using only the
numeric value.

Example: Table1
SchoolID(autokey) SchoolName
1 ZName
2 AName

Example: Table2
FactID(autokey) School (Lookup using "Name" of table 1) Enrollment
1 ZName
500
2 AName
1000

I want my report to use Table2 and to sort alphabetically by School so the
value "AName" should be first, not "Zname." But it seems to be sorting by
Table1's Autokey because it keeps putting Zname first?

Any help appreciated. The example is simplified, I could well be doing
something else wrong... Thanks! -H.
 
D

Duane Hookom

Do you include the field [SchoolName] in your report's record source? If so,
use it in the Sorting and Grouping dialog. If not, then make sure it gets
into the recordsource query.
 

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