Third Cascading Combo Box Displaying too Much Data

S

ScottMSP

Hello,

I have three cascading combo boxes in a subform: cbxSurveyID,
cbxSurveyJobNumber, cbxSurveyBreakout.

The first two combo boxes are working correctly and allows me to select a
SurveyID and then the second combo box only displays the SurveyJobNumbers
associated with that particular SurveyID.

The issue is with the third combo box. It is displaying any SurveyBreakout
that matches the SurveyJobNumber regardless of what SurveyID I have selected.

For example, when I select SurveyID 050108, and SurveyJobNumber 102, the
SurveyBreakout combo box should only display two separate breakouts that are
in SurveyID 050108 under SurveyJobNumber 102. Instead, the SurveyBreakout
combo box is displaying all breakouts that match SurveyJobNumber 102. Just
to be clear, it is possible to have the same SurveyJobNumber under different
SurveyID’s.

In this example, I need the third combo box to only display SurveyBreakouts
that are contained to SurveyID 050108 and SurveyJobNumber 102.

Thanks in advance.

-Scott
 
S

ScottMSP

I got it.

The answer was in my case, in the third combo box I needed to reference both
the second and first combo boxes. I am not sure why, but when I did that, it
worked.
 
D

Dale Fye

Scott,

Then the SQL for the RowSource of your SurveyBreakout needs to reference the
values in both of the previous combo boxes, not just one. Since we don't
know anything about your table structure, I'll make an assumption that you
have a table ("yourTable") that contains at least 3 fields (SurveyID,
SurveyJobNumbers, and SurveyBreakout. If this is accurate, then the
RowSource of cbxSurveyBreakout should look something like:

SELECT yourTable.SurveyBreakout
FROM yourTable
WHERE yourTable.[SurveyID] = me.cbxSurveyID
AND yourTable.[SurveyJobNumber] = me.cbxSurveyJobNumber

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 

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