Ben, that's a non-answer to the questions asked.
1) What did you expect the
DoCmd.SetParameter
to do?
This command answers the prompts that a direct call to the query would make. Please read thru:
DoCmd.SetParameter Method (Access)
2)
Show us the Query SQL - PLEASE format the posted SQL using the [CODE/] format control.
If we have this, then we have a much better chance of pointing you in the correct direction towards a solution
3)
Show us the code you are using to call the query. Once again, PLEASE format the posted SQL using the [CODE/] format control.
If we have this, then we have a much better chance of pointing you in the correct direction towards a solution
++ You simply must answer the questions that we the Experts ask of you if you want us to help you help yourself. In this case we do not know how you are getting the information for the parameters, are you pulling from a form, hard coding, what? We don't know if you have typo or something else malformed in the code. Finally, we don't know if you have simply misunderstood the code you are using.
BTW: The link Saga gave you will answer your question; however, it's a lot of information to digest.
https://msdn.microsoft.com/en-us/lib...or=-2147217396
Another version of this can be found at:
Access Tutorial 10: Parameter Queries
A large number of use form controls with parameters within stored queries, there is an example of how to do this in the link.
PLEASE, PLEASE, PLEASE, go thru the tutorial link I PM's you. It will provide you with the hands-on experience you need to answer these questions.