how a combo box populate other combo box....

  • Thread starter zerocool.farooq
  • Start date
Z

zerocool.farooq

Hello every body
i have a problem hope ill got some solution from this forum, is
that i have two combo box one is created by a table which is main
catagory lists and other is created by a query which have a parameter
which have sub-catagory i want that when i select the any main catagor
from first combo box automaticaly second combo box populated with
sub-catagory related with main catagory. how to do this help
plzzz....ill be very thankful for all for helping me...

zerocool
 
J

J. Goddard

Hi -


In the after update event of comboBox1, put code something like this:

dim SQL as string

sql="Select FieldName from Subcategory where subcategory.category = '" &
me!combobox.column(0) & "'"

me!combocox2.rowsource = sql

This is just an example; if the category value is numeric, you won't
need the quotes, and you will have to be sure to get the column
reference right - remember that the first column in the combo box is
column(0).

Hope this helps

John
 

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

Similar Threads

Dependent Combo Boxes 3
Combo Box 1
sum combo box based on other combo box 2
Combo Box 1
Populate a combo box 3
filter on combo box possible? 1
Combo Box question for Access 07 1
Combo Box 2

Top