E-mail help

Rhymeo

New member
Local time
Today, 02:03
Joined
Sep 19, 2006
Messages
3
Hi, im new to Access -

Anyway, i have a table with two fields - Email, and Verify Email, how do i do it so the user has to type the correct Email twice or an error message will pop up?

I have searched the forums but have had no luck,

Thanks in Advance
 
Last edited:
On the form where the user enters the e-mail addresses (always make sure that the user accesses details via a form, and that form looks at a query, not directly at the table) you will have 2 text boxes. These will match to the 2 fields above. You could put some code behind the verify email text box so that after update it checks if it matches first text box.
ie. open properties of 2nd text box, go to event tab, and go to after update line. Double click within line until event procedure is showing. Go to far right hand side and click on box with 3 dots in it. You can now insert

If txtbox2.Value <> TxtBox1.Value Then
MsgBox ("doesn't match!")
exit sub

You will need to substitute txtbox2 and txtbox1 with the names of the text boxes on your form. Txtbox 2 would have to be the verify email text box.

You can obviously change the message to whatever you like. You could be more fancy by getting it to delete the entries in second or both text boxes if this occurs by adding

[txtbox1].value = ""

after the msgbox. You will need to ensure the corresponding field in the table can accept a zero length string
 
macca: would you agree that only one field is bound to the query/table and the other is unbound?
 
yes most definetely, unless want to store both e-mail entries. I would probably have txtbox1 as the unbound box, as you only want to store e-mail once it had been verified
 

Users who are viewing this thread

Back
Top Bottom