How do I set the input mask for an Email field in Access 2003?

  • Thread starter Thread starter Guest
  • Start date Start date
It's considered polite to use the big white text area to post your
questions.

An EMail field is simply too variable and too complex for the very
limited Input Mask tool to manage. You'll need to use some non-trivial
VBA code in the BeforeUpdate event of the textbox on your Form to
validate it, or just trust your users.

John W. Vinson[MVP]
 
John
if you've already written this VBA code would you consider sharing it? I'm
just temping here to create a dbase (& based on what I've seen so far, the
more input masks I can build in the better!)
thanks much, Sue
 
I've used a validation rule that enforces at least minimal compliance:
Like "?*@?*.??*"
This requires one or more characters, followed by the @, one or more
characters, followed by the ., followed by two or more characters (as far as
I know there aren't any single-character domain types).

You can't make a useful input mask because the number of characters in each
position varies. Input masks are only helpful if the input format is always
the same, or perhaps a few options like you can see in the samples for zip
code and phone number.
 
Paul Shapiro said:
This requires one or more characters, followed by the @, one or more
characters, followed by the ., followed by two or more characters (as far as
I know there aren't any single-character domain types).

Agreed. Although there are some single letter domain names. Try
www.q.com or www.z.com.
You can't make a useful input mask because the number of characters in each
position varies. Input masks are only helpful if the input format is always
the same, or perhaps a few options like you can see in the samples for zip
code and phone number.

This assumes you only have USA zip codes or North American phone
numbers.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
Back
Top