Code to check if a valid e-mail address was entered

L

LisaB

Does anyone know the code or know where I can find code to check a field to
make sure the e-mail address is valid?

I have a table that holds contact information.
One field holds the e-mail address.
This data was imported from another database and some of the entries in this
field are as follows:

a. no current email address
b. [email protected] or [email protected]
c. Unknown
d. [email protected];[email protected]
e. [email protected]
f. <blank>
g. SomeName - [email protected]

I need code to loop through this table and return all the ones that are not
valid (not accepted by outlook as a valid e-mail address)

also

is there code to prevent a user from entering an invalid e-mail address into
a field on a form? (Access 2000)

Thank You
 
B

Barry Gilbert

Lisa,

Here's a simple function to evaluate the string. You'll need to loop a
recordset object to evaluate the field.

HTH,
Barry
 
Top