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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

E-mail validation rule 1

Status
Not open for further replies.

kailoont02

Technical User
Dec 26, 2003
7
HK
I want to create a validation rule for an "E-mail" field.
It will check that the data CONTAINS an "@" and a ".com",
Is this possible?
 
In the AfterUpdate event for the control in question....put:

If Not Me![controlname] Like "*@*" Or Not Me![controlname] Like "*.*" Then
MsgBox ("Invalid e-mail address")
End If



=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
MCSA, CNA, Net+, A+
w: rljohnso@stewart.com
h: wildmage@tampabay.rr.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top