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

How can I make a field validate itself to another field? 1

Status
Not open for further replies.

ssnapier

Technical User
Joined
Feb 17, 2001
Messages
67
Location
US
I want to be able to have to email fields and the ability to have them verify themselves against each other. How can I tell Access to do that for me?
 
Perhaps he means he wants them to compare themselves and prompt the user if they don't match.

I created two textboxes, eMail1 and eMail2. Here's some code:
Code:
Private Sub eMail2_AfterUpdate()
    If eMail2 <> eMail1 Then
        MsgBox "eMail Mismatch."
    End If
End Sub
 
You got it right, I want to be have the ability to make sure two email address fields are the same. Where would I put that code snippet in relation to the two fields?
 
Not trying to steal Reuel's thunder here...

On the AfterUpdate event of the second field (as displayed in his code above).

Harleyquinn

---------------------------------
For tsunami relief donations
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top