469,909 Members | 1,769 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,909 developers. It's quick & easy.

Mixed case input mask

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
1 4412

"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.

Similar topics

6 posts views Thread by dude | last post: by
2 posts views Thread by Ellen Manning | last post: by
2 posts views Thread by johnp | last post: by
7 posts views Thread by F. Michael Miller | last post: by
10 posts views Thread by Chih-Hsu Yen | last post: by
9 posts views Thread by msnews.microsoft.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.