Proper Case function?

fpperry

Earnest Dabbler
Local time
Yesterday, 23:34
Joined
Jan 13, 2003
Messages
9
Is anyone aware of an Access function that replicates the Proper Case spreasheet format, i.e. each word begins with an Uppercase character? Or is it necessary to build a VB procedure to update the text property of a text box? I having trouble building such a format. Thanks.
 
Try this in the afterupdate event of your text box...

txtName = Trim(txtName)
txtName = StrConv(txtName, vbProperCase)

Check the help files for the StrConv Function for more info.

HTH
 
Much appreciated, ghudson. :)
 
ghudson,, May I ask the reason for the trim
I use Address = StrConv(Address, vbProperCase) where address is the control name and it works fine:)
Just wondering.
Dave
 
Yes it will work just fine without the Trim(). I just use the extra step to ensure the user has not keyed a space at the beginning of the name (first or last) field. You would be surprised as to how many times my users key a space in front of their keyed names when typing in the text fields.

An ounce of prevention saves a ton of work!

HTH
 
Thanks.
I wonder if my boss is related to any of your users, sure does some unexpected things at times!
Dave
 

Users who are viewing this thread

Back
Top Bottom