I’m trying to conjugate a SELECT using a multiple OR’s in my WHERE clause, with little success.
SELECT [Student Info Table].[StuID], ([Student Info Table].[First Name] & " " & [Student Info Table].[Last Name]) FROM [Student Info Table] WHERE [Forms]!pLName=[Student Info Table].[Parent 1A Last] Or [Forms]![pLName]=[Student Info Table].[Parent 1B Last] Or [Forms]![pLName]=[Student Info Table].[Parent 2A Last] Or [Forms]![pLName]=[Student Info Table].[Parent 2B Last] ORDER BY [Student Info Table].[Last Name];
This statement is my RowSource bound for display in a combo box for selection, I’ve verified pLName has the correct value via On Click/MsgBox.
The intention here is to select only those students who’s Parents last name matchs that of the last name in [Forms]![pLName]. I imagine children from the same family could have different last names via divorce.
When I hit the drop down or run the SELECT in datasheet view I get the same result, nothing.
Thank you in advance!
SELECT [Student Info Table].[StuID], ([Student Info Table].[First Name] & " " & [Student Info Table].[Last Name]) FROM [Student Info Table] WHERE [Forms]!pLName=[Student Info Table].[Parent 1A Last] Or [Forms]![pLName]=[Student Info Table].[Parent 1B Last] Or [Forms]![pLName]=[Student Info Table].[Parent 2A Last] Or [Forms]![pLName]=[Student Info Table].[Parent 2B Last] ORDER BY [Student Info Table].[Last Name];
This statement is my RowSource bound for display in a combo box for selection, I’ve verified pLName has the correct value via On Click/MsgBox.
The intention here is to select only those students who’s Parents last name matchs that of the last name in [Forms]![pLName]. I imagine children from the same family could have different last names via divorce.
When I hit the drop down or run the SELECT in datasheet view I get the same result, nothing.
Thank you in advance!