By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,948 Members | 1,929 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,948 IT Pros & Developers. It's quick & easy.

Mixed case input mask

P: n/a
Hi

What would be the input mask for a name field where first letter is caps and
the rest lower? Its ideal if the mask can handle multiple names separated by
a space but if not a single word will do.

Thanks

Regards

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:41***********************@news-text.dial.pipex.com...
Hi

What would be the input mask for a name field where first letter is caps and the rest lower? Its ideal if the mask can handle multiple names separated by a space but if not a single word will do.


I caution that many users find input masks distracting and irritating. I
find it better to use VBA code to check or format the input afterward,
except occasionally to absolutely force proper formatting of dates (and, it
is almost always impossible to force the proper date, only the format).

The builtin StrConv function, with the option set to Proper case, will
convert your names to what you want... then store them in the database. If
your Control is named txtTextField, then in the Form's BeforeUpdate event,
you can put:

Me.txtTextField = StrConv(Me.txtTextField, vbProperCase)

If by "names", you mean first and last names of the same person, I will also
caution that it will be better to save them separately, because sooner or
later, you are likely to need to use them separately. It is very easy to
concatenate them, but can be very irritating to have to try to separate
names into their component parts if they are stored as a single text string.

Larry Linson
Microsoft Access MVP

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.