Sort text field by 2nd word

  • Thread starter Thread starter JWeaver
  • Start date Start date
J

JWeaver

I have a text field that contains names of workers in FName LName format. Is
there a way that I can sort this field by the Last Name (2nd word of field)
so that the records will be in alphabetical order by last name instead of by
first name? I know that the best way would be if the names were in separate
fields but this is how the database was set up some time ago.

Thanks!
 
You can use an expression in the Sorting and Grouping like:
=Mid([FieldName], Instr([FieldName]," ")+1)
 
Thank you. That worked beautifully!!
--
JWeaver


Duane Hookom said:
You can use an expression in the Sorting and Grouping like:
=Mid([FieldName], Instr([FieldName]," ")+1)

--
Duane Hookom
Microsoft Access MVP


JWeaver said:
I have a text field that contains names of workers in FName LName format. Is
there a way that I can sort this field by the Last Name (2nd word of field)
so that the records will be in alphabetical order by last name instead of by
first name? I know that the best way would be if the names were in separate
fields but this is how the database was set up some time ago.

Thanks!
 
Back
Top