Solved

How to create an email input mask with access 2k

Posted on 2004-09-25
4
5,665 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 41

Accepted Solution

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

Expert Comment

by:kellykln
ID: 24268138
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
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, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

688 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