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

J

John Vinson

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]
 
S

Sue in IL

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
 
P

Paul Shapiro

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

Tony Toews [MVP]

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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Input masks 1
Input masks 4
Input Mask in tables 2
Input Mask - Date and Time 7
Input Mask or Validation? 24
Extending Input Mask 4
I need a phone input mask that does this 888.123.2233 or 123.2233 2
Input Mask 1

Top