PLEASE HELP - I ONLY HAVE 2 HOURS TO FINISH THIS PROJECT

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

Guest

I AM TRYING TO FIGURE OUT HOW TO VALIDATE THAT 2 FIELDS ARE THE SAME

FOR EXAMPLE I'M USING THE FOLLOWING CODE TO DETERMINE IF THE FIRST FIELD IS FILLED IN

If IsNull(Me.Email) = True The
MsgBox "Please enter your Email Address!
Me.Email.SetFocu
Exit Su
End I

NOW I'M TRYING TO CONFIRM THIS INFO AGAINST ANOTHER FIELD

IE
FIELD 1 = EMAI
FIELD 2 = CONFIRM EMAI

PLEASE ANY HELP WOULD BE GREAT. PLEASE TRY TO BE AS DETAILED AS POSSIBLE

THANK YOU IN ADVANC

MIK
 
MIKE said:
I AM TRYING TO FIGURE OUT HOW TO VALIDATE THAT 2 FIELDS ARE THE SAME.

FOR EXAMPLE I'M USING THE FOLLOWING CODE TO DETERMINE IF THE FIRST
FIELD IS FILLED IN:

If IsNull(Me.Email) = True Then
MsgBox "Please enter your Email Address!"
Me.Email.SetFocus
Exit Sub
End If

NOW I'M TRYING TO CONFIRM THIS INFO AGAINST ANOTHER FIELD.

IE -
FIELD 1 = EMAIL
FIELD 2 = CONFIRM EMAIL

PLEASE ANY HELP WOULD BE GREAT. PLEASE TRY TO BE AS DETAILED AS
POSSIBLE.

THANK YOU IN ADVANCE

MIKE

First, a note on etiquette: Writing messages in all capital letters is
considered shouting, and actively discourages people from wanting to
help you.

Now, about your question:

You might try something like this:

If Me.Email = Me.[Confirm Email] The
' the fields are the same.
Else
' the fields are different, or Null.
MsgBox "Please re-enter or confirm your Email Address!"
Me.Email.SetFocus
Exit Sub ' maybe
End If

What steps you should take if the fields are different will depend on
where this code is being placed.
 
Back
Top