Query based on combo box value

B

Brad

I have a report that is based on a query. The query needs a value from a combo box on my form. How can I get the value from the combo box into my query

This is my query..but it doesn't work..it prompts me for the paramete

SELECT
FROM Histor
WHERE OximeterModel=cboSelectProd.Value
 
J

Jim Kennedy

You need to reference your form similar to this:

SELECT *
FROM History
WHERE (((History.[OximeterModel])=[Forms]![YourForm]!
[YourCombo]));

If you right-click on the criteria block in your query
QBE, you can use the 'Build' option to help reference the
form.
-----Original Message-----
I have a report that is based on a query. The query needs
a value from a combo box on my form. How can I get the
value from the combo box into my query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top