Combobox values

  • Thread starter Thread starter Terry VanDuzee
  • Start date Start date
T

Terry VanDuzee

Hello
I know this is probably a silly question to most of you but here it is
anyways.

I have a combobox on a form that displays values from a table.
I have a second combobox that I want to only display the values from a table
where the ID is = the ID in the joined table (where the first combobox gets
its values).

EX:
Table 1
*Conn_ID Conn_Type

Table 2
*Prob_ID Prob_Type P_Conn_ID

Combobox 2 should display the Prob_Type from Table 2 but only where the
P_Conn_ID = Conn_ID

*=primary key

Thank you so much
Terry V
 
This is called the Cascading Combobox problem.

In the RowSource of Combo2, there should be a query which references Combo1.
Then the second part is to have a line of code in the AfterUpdate event of
Combo1 that Requeries Combo2.

On my website is a small sample database called "CascadingCombos.mdb" which
illustrates how this works.
 
Hi Terry,

I'd use this

SELECT Table2.*
FROM Table2 INNER JOIN Table1 ON Table2.P_Conn_ID
= Table1.Conn_ID;

for the row source for the combobox

Karen
 
Back
Top