name query

iso96

Registered User.
Local time
Today, 00:27
Joined
Mar 21, 2005
Messages
10
Hello,

i have a table with a field containing peoples 'names' for example - David Moore is there anyway of doing a query on this so it lists the contents in order of the surname.

Thanks for your time


iso
 
Hi
Something like this in your query :

Surname: Right([MyFieldName],Len([MyFieldName])-InStr([MyFieldName]," "))

will extract all of the data after the first space. You can then sort on that. Be aware that if an entry has a name such as "Mary Anne Smith" then it will pick up "Anne Smith" instead of Smith.

Remember to use your actual field name.

HTH, Andrew
 
thanks guys,

decided to seperate them.
 

Users who are viewing this thread

Back
Top Bottom