Capitalisation

Coastie

New member
Local time
Today, 08:22
Joined
May 18, 2003
Messages
7
Hi,

Two issues relating to this subject that have got me beaten.

1 I have imported a list of names and addresses into my DB and want to change the names part (each in its own field) so that the first letter is a capital. They are currently all in capitals.

2 I then want to ensure that any future entry will result in each name (forename(s), Surname etc) having the first letter as a capital.

Any ideas?

Thanks
 
For 1) use this

StrConv([MyField], vbPropercase)

or use the find and replace in the table.

For 2) use an input mask

Col
 
Actually, thinking about it, the find and replace method is not so good on name fields because there are too many different ones.

Col
 
I tried looking for a mask to allow me to do this but failed. Looked at the help section but couldn't see a way to create a mask to do what I wanted.

Ive used the StrConv and amended all the existing names to capital first letters, thanks
 
>L<?????????????? should do it

Any letter(s) that follow the > will be in capital and any letters that follow the < will be in lowercase. You have 15 characters there to play with and the ? means that entry is optional.
Course its a bit more complicated if you get those American names like
Mary-Lou or Sue-Ellen ;)

Col
 
Col's answer works but you need to pad out the mask to the length of the underlying field, not just 15 characters.

The alternative, which I prefer, is to use vbProperCase again. Put this code in the After Update event of your field on your input form
Code:
Me.MyTxtBox = StrConv(Me.TxtBox, vbProperCase)
where MyTxtBox is the name of the control concerned.
 

Users who are viewing this thread

Back
Top Bottom