Assistance with UCase and person surmanes

plannerg

Registered User.
Local time
Today, 10:33
Joined
Oct 19, 2005
Messages
23
I am hoping someone can help me here.

I have peoples surnames that I need to be in all uppercase but for Surnames beginning with MC (i.e. McDonald, McKay etc) I need the 'c' to be lower case so that names display as McDONALD and McKAY. The same foe a few that begin with Le (i.e LeCRAS).

Is someone able to help me achieve this.

The code I'm currently using is:

Name: (UCase([LastName]))+" "+([FirstName])

Thanks.
 
For Mc it could start like this:
IIF(Left(Lastname,2)="mc", "Mc" & UCase(Mid(Surname,3)) ....

Le is a problem because there are names like Lester etc.
 
....thanks. Any idea how it may finish as well!??
 
Try this:
Code:
IIF(Left(Lastname,2)="mc", "Mc" & UCase(Mid(Lastname,3)) & " " & UCase(Firstname), UCase([LastName] & " " & [FirstName]))

If you want to be a successful developer you really need to try and work some stuff out yourself. You replied only five minutes after I posted so you clearly didn't try very hard.

Look at the help for the functions used. It isn't a difficult expression.
 
Other name issue.... MacDonald and Macauley.
 

Users who are viewing this thread

Back
Top Bottom