I need help with creating a nested select statement. I have 2 tables shown below (they contain more fields, but am only listing what is applicable:
Requirements Table
U_RQ_ID
U_RQ_Description
U_Applicable Configurations Table
U_RQ_ID
U_Vehicle_Config_ID
I have a list box that the user will select a vehicle configuration ID and want to be able to pull up all the requirements for that vehicle configuration ID. A requirement can be applicable to several vehicle configurations.
Here is the select statement I am having trouble with. The error I am receiving is: Too few parameters: Expected 2.
Set rst = db.OpenRecordset("Select * from U_requirements where U_requirements.[U_RQ_ID] IN (Select U_Applicable_Configs.[U_RQ_ID] from U_Applicable_Configs where U_Applicable_Configs.[U_Vehicle_Config_ID]= Me![U_Vehicle_Config_ID])")
Thank you!
Chaticathe
Our community of experts have been thoroughly vetted for their expertise and industry experience.