Validation rule for an email

Matizo

Registered User.
Local time
Yesterday, 22:45
Joined
Oct 12, 2006
Messages
83
Hello,
I was looking for the validation rule or input mask for an email but I could not find anything what would match what I need.

Any ideas how can I validate an email or use an input mask for it?

Thanks,
Matt
 
In the BeforeUpdate event of the email field, put this:

Code:
If InStr(1,[Email_Field_Name],"@")=0 Or InStr(1,[Email_Field_Name],".")=0 Then
    MsgBox "Please enter an email in the name@domain.com format."
    Cancel = True
End If

That will check for the @ symbol and a dot (as in .com, .org, etc.) and if either is missing, it will tell the user the email format is wrong and keep the focus on the email field.
 
There's no validation rule or format I'm aware of. Why are you using a macro? What was wrong with the code I provided or the more detailed example that pbaldy linked to?
 
By using a macro I tried to make it simpler, I am doing a project for A2 Level and I’m afraid I would not be able to describe fully the code you gave me in the implementation section:eek:
 

Users who are viewing this thread

Back
Top Bottom