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'.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.