Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query for Combo Box

Status
Not open for further replies.

macdoggy

Technical User
Dec 21, 2007
12
US
I have a survey and some of the questions are multiple choice. Each
question has it's own set of multiple choice answers.

I have a table called tblQuickAnswers which has the text for each
multiple choice answer. I have a table tblQuestions, which has the
text for each question. I have a table tblQuickAnswerQuestions which
is a link between these two.

On my form I have a combo box which has tblQuickAnswers for it's
control. My question is, how do I get the combo box to show just the
quickanswers that are possible for that particular question instead of
showing all the quickanswers?

Is there a way to pass a variable from my form to the query the combo
box is linked to?

Thanks!
 
Wow, thanks. That sort of works! However, I get the same group of answers for every question! Any idea why?

Here is the code:

SELECT [qryQuestionQuickAnswer].[QuickAnswer] FROM qryQuestionQuickAnswer WHERE ((([qryQuestionQuickAnswer].[qID])=[Forms]![frmCityState]![tblAnswers subform].Form!qID_FK)) ORDER BY [qryQuestionQuickAnswer].[QuickAnswer];
 
Are you requerying in the current event?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top