troubleshooting Question

Nested Select Statement in Access 2010

Avatar of chaticathe
chaticathe asked on
Microsoft AccessSQL
8 Comments2 Solutions498 ViewsLast Modified:
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_Applicable Configurations Table

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!

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros