Why is this If
Statement not recognising the Then
's and is just saying "Expression Expected" with a blue underline under the two last Then
's, the first one is fine.
If fst <> "" And lst = "" Then
cmd = New OleDbCommand("SELECT * FROM Customers WHERE FirstName='" & fst & "';", cn)
ElseIf fst = "" And lst = <> Then
cmd = New OleDbCommand("SELECT * FROM Customers WHERE Surname='" & lst & "';", cn)
ElseIf fst <> "" And lst = <> Then
cmd = New OleDbCommand("SELECT * FROM Customers WHERE Surname='" & lst & "' AND FirstName='" & fst & "';", cn)
End If