Hey guys
I believe I am writing this right but I get a else without if error message anyone can help me with this here is the code.
If optLastName.Value = 1 And OptFirstName.Value = 0 Then Me.RecordSource = "SELECT tblmain.LastName, tblmain.firstName " & "FROM tblmain " & "WHERE tblmain.LastName LIKE '*" & txtSearch & "*';"
Else
If optLastName.Value = 0 And OptFirstName.Value = 1 Then Me.RecordSource = "SELECT tblmain.LastName, tblmain.firstName " & "FROM tblmain " & "WHERE tblmain.FirstName LIKE '*" & txtSearch & "*';"
End If
I believe I am writing this right but I get a else without if error message anyone can help me with this here is the code.
If optLastName.Value = 1 And OptFirstName.Value = 0 Then Me.RecordSource = "SELECT tblmain.LastName, tblmain.firstName " & "FROM tblmain " & "WHERE tblmain.LastName LIKE '*" & txtSearch & "*';"
Else
If optLastName.Value = 0 And OptFirstName.Value = 1 Then Me.RecordSource = "SELECT tblmain.LastName, tblmain.firstName " & "FROM tblmain " & "WHERE tblmain.FirstName LIKE '*" & txtSearch & "*';"
End If