Synchronizing Combo Boxes

D

Denise

I need to synchornize two combo boxes

1st combo box contains the "QUESTION NAME"

2nc combo box contains the "CATEGORY"

What is the event procedure or the macro to make this happen?

Thanks.
 
J

Jim Bunton

For the first combo the onclick event

set up a query that returns the possible values of Category for the Question
clicked on

me.ComboOne returns this value
so the query is something like

"SELECT CategoryId, CategpoyTxt FROM categorie WHERE question = " &
me.comboOne
then set this as the rowsource for the second Combo

me.comboTwo.Rowsource = sql

then requery the combo

me.ComboTwo.requery

It will thendisplay only the categories you want

[You may can hide the Id's and just show the text by making the id column
zero width

something like comboOne.columnwidths = 0cm; 2.5cm]
 
J

John W. Vinson

I need to synchornize two combo boxes

1st combo box contains the "QUESTION NAME"

2nc combo box contains the "CATEGORY"

What is the event procedure or the macro to make this happen?

Thanks.

What do you mean by "synchronization"? What is the relationship between
quetion names and categories? It might help to post the SQL view of the
Rowsource queries of both combos, or (if they're based on a table) the
relevant table fields.
 

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