EMail address checker

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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?
 
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.
 
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
 
Back
Top