Solved

How to create an email input mask with access 2k

Posted on 2004-09-25
4
5,590 Views
Last Modified: 2012-05-05
Hello I would like to create a Input mask with access 2k
for email address.
Thanks for your help
0
Comment
Question by:Ok123
4 Comments
 
LVL 41

Accepted Solution

by:
shanesuebsahakarn earned 50 total points
Comment Utility
An input mask is not suitable for this. Use a validation rule instead.
0
 

Expert Comment

by:kellykln
Comment Utility
Private Sub email_Exit(Cancel As Integer)
    Dim checks, checks2 As String
    If Not Emty(Me!Email) Then
        checks = InStr(2, Email, "@")
        checks2 = InStr(checks + 2, Email, ".")
        If checks = 0 Or checks2 = 0 Or checks2 = Len(Me!Email) Then
            MsgBox "Invalid email address. Please correct"
            Cancel = True
        End If
    End If
End Sub
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now