Convert data to vbPropercase

casey

Registered User.
Local time
Today, 09:23
Joined
Dec 5, 2000
Messages
448
Hello all,

Can someone tell me if an InputMask can be used to convert entered data to vbProperCase? I know how the strconv() function works and I can write a procedure to convert the data after the data is entered, but I figured that an InputMask would make it easier if possible.
 
Input mask are only a solution when the format of the input is relatively well defined. If you are dealing with a sentence ok unknwon number of words, for example, it won't do, and you should go for strconv(). It will be a solution if there is for example just one word, or you know exactly the number of characters, etc.
What kind of data do you want to convert to proper case?
 
Actually, the data I would like to convert to vbProperCase varies from personal names to long sentences. By the sound of it, I may need to use the strconv() function AfterUpdate() or something of the like?
 
Yes you will have to. Something like

Me.Controls("YourControlName").Text = strconv(Me.Controls("YourControlName"), vbProperCase)

in the Before Update event of the form.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom