At most one record can be returned by this subquery. (Error 3354)

Spocks

New member
Local time
Tomorrow, 00:55
Joined
Aug 25, 2013
Messages
9
Hi and thank you in advance. I'm trying to create a listbox that populates on the following query however i get the following error.

At most one record can be returned by this subquery. (Error 3354)

This is my SQL:

SELECT Students.[Student ID], Students.[Student Name]
FROM Students
WHERE (((Students.[Student ID])=(SELECT [Student ID]
FROM [Student_Sports]
WHERE [Sporting Team] = [Forms]![SV_Teams]![txtTeam])));
 
So what is unclear in the answer you found with google?
 
I'm found no answer on google that's why I'm here...
 
You have two from clauses and two where clauses. You can only have one of each. When you don't know SQL syntax, use the QBE to build the query. In this case, add both tables to the grid. Then draw a join line between Students and Student_Sports on StudentID. Then add the criteria to the SportingTeam field.

FYI - best practice names do not include spaces or special characters.
 

Users who are viewing this thread

Back
Top Bottom