If the form is going to be open when you are running the query, you can set the parameters to controls on the form. For example, assume you have a textbox called Textbox1 on your form that will contain the value you need for the query. Open your query in design mode. On the Criteria line for the field in the query that needs to get its value from the form, enter the following (change the form name and control name as appropriate):
As long as the form is open when the query is called, the query can reference the value of a control on the form in this manner.