Basing a query on the selection in a Combo box parameter

  • Thread starter Thread starter quickvic
  • Start date Start date
Q

quickvic

I have a group of engineers polling servers to learn what Middleware is
running. I would like to give them a dataset to update as they get the info
from the servers. I created a query that asks for a middleware type, and
returns the servers that run that middleware. But I realize that there is a
difference between WAS and Websphere, and expect users to make that mistake.
To me the obvious answer is to force users to select from a fixed list in a
combo box.

I used Access Help, and found a topic for placing calendar controls in a
form to drive the criteria for the query, and modified it for a combo box
based on tblProductTypes. That table contains 8 records.

This is beyond my understanding. I can run the query, and the standard
Parameter popup (with the text box) opens, or I can test the form and it
works, and when I do that and then run the query, the results are based on
the selection in the combo box. But I don't seem to be able to run the query,
have the form with the combo box open, make the selection, click OK, and have
the results I expect. What am I missing or doing wrong?

Sorry for being so verbose, but I'm trying to provide all the info I can.
I'm happy to answer questions that will help with troubleshooting.

Bob
 
How many fields does your tblProductTypes have? Could it be that combo is
displaying text and you are using something like TypeID (a number) as
criteria?
 
Karl,

Thanks for your suggestion.

The tblProductTypes uses 2-4 letter acronyms and full spellings of the
middleware. So, WAS is the first column, WebSphere is the other, for example.
The table does not have a primary key. But I'll look at the combo box and see
that the correct column is being accessed (no pun intended).

BTW, as a test I changed the query to a plain parameter select query, and
the query works, as long as the keyword is spelled correctly. I have a
work-around, and that is to put the correct keywords in the Parameter query
question, but I'd still like to learn how to make this work with a form and a
combo box. I have 10+ years experience with Access, but I'm not a coder.

Regards, Bob
 
Back
Top