Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

email validation in MS ACCESS

Status
Not open for further replies.

85858585

Programmer
Nov 15, 2002
2
0
0
SG
I have made a form in access. I want to impose a validation rule for my email field, so that anything entered there other than the email address should give a validation text 'It's not an email address'.

Please help me. Thanks in advance.
 
I have created a form that does email verification. I control the verification by not letting the user proceed until they click a verify button. The button is coded as follows.

If [Email_Address] Like "*@*.*" = True Then
Control1.Visible = True
Label1.Visible = True
Exit Sub
End If
If [Email_Address] Like "*@*.*" = False Then
MsgBox "Invalid email address! Please verify and correct."
End If
End Sub

This limits the field to be in the format "alpha-numeric@alpha-numeric.alpha-numeric".

In other words,

it won't accept "anywho@nowhere"
or "@nowhere.com"
etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top