Names in Alpha order

P

Penny

I have a field which has a person's full name (First,
Last). My report has a sorting in it by the field name.
When it prints it sorts alpha order by the first name. How
would I get it to sort in alpha order by last name?


Thanks in advance
Penny
 
F

fredg

Penny said:
I have a field which has a person's full name (First,
Last). My report has a sorting in it by the field name.
When it prints it sorts alpha order by the first name. How
would I get it to sort in alpha order by last name?


Thanks in advance
Penny

How is the field's underlying data stored?
As 2 separate fields of [FirstName] and [LastName] ?
If so, add the last name field to the report recordsource and, in the
Report's Sorting and Grouping dialog, sort by that field.

If not, then make a query the record source for the report using all the
fields currently in the report.
Add one column to the query:
[SortByName]:Mid([FullName],InStr([FullName], " ")+1)

Use this field in the report's Sorting and Grouping dialog to sort by.

The above expression will work IF all the names are in the same
first name space last name order. If not you'll need to first get all
your records in the same order.
 

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

Similar Threads


Top