Where is the missing Operator?
Code:
If Nz(DLookup("Email", "Employees", "Email=" & Me![Email]), "") <> "" Then
correo = DLookup("Email", "Employees", "Email=" & Me![Email])
Two things. First, it's ElseIf in VBA, not Else If (no space). Second, you have an extra End If at the end of the If block. See below:
Private Sub ResetButton_Click()
Dim correo As String
If Nz(Me.Email, "") = "" Then
MsgBox "Email Empty. Please Enter a Valid Email Address.", vbInformation, "Email Empty"
Me.Email.SetFocus
ElseIf Nz(DLookup("Email", "Employees", "Email= '" & Me.Email & "'", "") <> "" Then
correo = DLookup("Email", "Employees", "Email= '" & Me.Email & "'")
End If
If correo <> Me.Email Then
MsgBox "Wrong Email Address. Please Use a Correct Email Address.", vbCritical, "Wrong Email Address"
Me.Email.SetFocus
Else
DoCmd.Close
DoCmd.OpenForm "UserVerificationPasswordReset"
End If
End Sub