EMail address checker

S

Stephen

I want to be able to enter an Email address twice on a form. If the address
is the same both times, the address is recorded on the database (once). If
it is different a warning message comes up and it is not possible to coninue
untill the addresses are the same. I presume this is best done with an
unbound and a bound field and appropriate code attached to an event property
of the latter. Is this the best way? What code should I use?
 
P

Penguin

First you need to explain why you need to enter a email address twice.
If an email is not entered for a record then enter the address, if it
is entered then you can see the data, correct?
 
S

Stephen

The database has been in use for some time with a lot of addresses and other
details being entered. We have found that email addresses are often entered
incorrectly hence the idea of entering them twice, as in a lot of online
forms, with a check to see if the two entries are the same.
 
P

Penguin

Well if you want to check two values then insert this in the second
text box BeforeUpdate property:

If Me!text1 = Me!text2 Then
DoCmd.RunCommand acCmdSaveRecord
Else
MsgBox "The address entered does not match the first entry."
Cancel = True
Me!text1.SetFocus
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top