On 16 Jan 2007 12:10:55 -0800, Denis wrote:
Hi,
I have a filed name called OwnerName where I typed in the persons first
name then surname. I now have a need to display the surmane first then
surname. Is there a way of reversing the order that the OwnerName is
displayed.
Maybe through a query or something
Thanks
Denis
So now you have the results of incorrect database design.
The FirstName should be in a field all by itself.
Same with the LastName as well as any MiddleName/Initial.
It is very easy to put the two names together, but it can be rather
difficult to separate them.
It all depends upon how the names in the OwnerName field are entered.
If ALL of the names are in FirstName space LastName order (John Smith)
then you can use:
NewNameOrder:Mid([OwnerName],InStr([OwnerName]," ")+1) & ", " &
Left([OwnerName],InStr([OwnerName]," ")-1)
Will result in "Smith, John"
The above will fail if the [OwnerName] includes a middle name or
initial, i.e. Robert Louis Stevenson, or John J. Smith.
A wiser move would be to separate completely in your table the first
and last names.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail