vbProperCase

Tango53

New member
Local time
Today, 19:05
Joined
Aug 27, 2008
Messages
4
Hello, I'm a new starter with Access VBA :o

Can anyone let me know how to get vbProperCase to capitalise not just the first letter of each name but the third and forth letter of surnames beginning with Mc or Mac respectively as well? I also want to capitalise the first letter of each name in a hyphenated double-barrelled surname such as Bloggs-Smythe, which currently converts to Bloggs-smythe.

This is what I'm using now:

Private Sub CustomerLastName_AfterUpdate()
CustomerLastName = StrConv(CustomerLastName, vbProperCase)
End Sub

Thanks very much in advance.
 
You'll need to write your own version of StrConv which calls the original when the name doesn't start with Mc or Mac.
 
Hello, I'm a new starter with Access VBA :o

Can anyone let me know how to get vbProperCase to capitalise not just the first letter of each name but the third and forth letter of surnames beginning with Mc or Mac respectively as well? I also want to capitalise the first letter of each name in a hyphenated double-barrelled surname such as Bloggs-Smythe, which currently converts to Bloggs-smythe.

This is what I'm using now:

Private Sub CustomerLastName_AfterUpdate()
CustomerLastName = StrConv(CustomerLastName, vbProperCase)
End Sub

Thanks very much in advance.

Hey Tango,

I asked a similar question, on another forum, a couple years back and one of the guru's there has written a function to handle mixing of vbCases. It may be more than what your looking for but follow this link if you want to download it and give it a test drive.

HTH,
Shane
 
Thanks GeorgeD and ShaneMan,

I'd really like to get to the file via your link but just can't recall my login details. Any chance of sending the file to me please ShaneMan? Sorry to be a PITA :o !
Cheers,
T.
 
Thanks GeorgeD and ShaneMan,

I'd really like to get to the file via your link but just can't recall my login details. Any chance of sending the file to me please ShaneMan? Sorry to be a PITA :o !
Cheers,
T.

Sure, but you need to tell me where to send it. I would tell you to PM me but if you can't log in then I guess that won't work either.

Shane
 

Users who are viewing this thread

Back
Top Bottom