Multiple Choice Parameters???

Yecats131

Registered User.
Local time
Today, 10:09
Joined
Apr 22, 2008
Messages
63
I'm trying to setup a parameter that has a multiple choice so to speak. Rather then the user being able to enter whatever data they want.. I would like them to have a choice between two items.

Is it possible? if so.. how do I do it?

Thanks!
 
You could use a combo box on a form to present the 2 options to the user. Have the query look at the combo for the criteria.
 
Combo box

Not sure how advanced you are, but to add a little to the previous reply, it's sometimes easier to add a table with the possible choices and then include it in the combo box choice. To get to the combo box, you'll have to set the data type to lookup wizard, which will give you all the options you need.
 
Thanks for the response you two! I actually have a combo box setup that I want the chooses to be. I'm just not sure how to have the parameter display them?

I'm a beginner with access... so please speak n00b! :0)

Thanks!
 
The criteria would be:

Forms!FormName.ComboName
 
Okay, so I put that in. When I run it, it prompts the box to ask for the user to type in the parameter.

What I'm wondering, is if the user can have something to pick from rather then having to know what the choices are from prior use of the form.

IE:

Combo Box has: Replacement and Additional

Parmater pops up and displays the choices for the user.

Thanks!
 
If you get the parameter prompt, either the form is closed or one of the names is misspelled.
 
Oh... it was because the form was closed. I didn't realize that caused it.

Okay, so new problem! :0) Now, instead of getting a prompt it just pops up with everything that is "Addition". I still need the user to be able to choose which they want. (Replacement or Addition).
 
It should return whichever records match the choice made in the combo. Can you post a sample db?
 
Oh okay, so I was taking some screenshots for you and I think I figured it out.

What the query does, is it bases its results on the record that I have open, and what in particular that record has picked. So, if I have one open that has an "Addition" selected, it pulls all of the Additions.

What I wanted, was for the user to run a query based off of the ENTIRE TABLE and select at that time whichever they are looking for.
 
That is doable, what you need to do is choose some other fields to filter by and do that same you did with the "Additions" field.

That way you are modifying the quiery according to what is on the form.
 
Let me understand:
The form you are working with, the one you did a screen shot of, is the information you want for the record you are looking for, correct?

If that's the case, select a few more distinct fields that you have on that form and reference them on your query the same way you did the "Mutiple Choice" parameter you worked on a few post above.

That way you are filtering the records on the database to get to the record you want. (If you could post a limited sample of the database it would be easier to understand.)
 
Ohhh... No... :0)

Basically, I want to setup a query so that it pulls up All of a type. So either All Additions or all Replacements. The thing is, I want it to provide a prompt at the time of the query for the user to pick rather then the query base itself off of the record that is currently open.

However, I do not want the user to have to memorize the two choices... I want the prompt to display the choices for them to pick.
 
Last edited:
OK easy enough in the query enter the following:

[Enter ADDITIONS or REPLACEMENT]


This should give them the two words they need to know. They will still need to enter them, but they will be right in front of them to see.

The Brackets [] will prompt them to enter and the words inside the brackets: Enter ADDITIONS or REPLACEMENT will show on the prompt.

Hope it's what you're looking for. Give it a try.

The other way to do it is to create a form to popup when they click to run the query and from within that form have the Multiple Choice Combo box and then run the query from there. That's if you want a combo box to control the input.
 
Last edited:
Actually yes.. that solves my problem.

Sorry for being so confusing... Although I know what you guys just taught me will come in handy... So it wasn't a waste. :)

Thank you!!!
 
I know. I'm still learning too. This site rocks! People like Pbaldy, RuralGuy, BobLarson and others that share their knowledge and time are the bomb!

They have taught me so much!

Thanks to all the regulars here!
 
Oh I just read this:

The other way to do it is to create a form to popup when they click to run the query and from within that form have the Multiple Choice Combo box and then run the query from there. That's if you want a combo box to control the input.

Do you mind walking me through this? I can definately forsee that being helpfull. Basically, How do I have the query show a form?

Thanks!
 

Users who are viewing this thread

Back
Top Bottom