Catagory and SubCatagory comboboxes

D

Dave

Hi

I have 2 tables (among others).. One has Catagories in it, another has
Subcatagories. the 2 are joined with a relationship.

On my main form, which drives my main database table, i want to be able to
select a catagory in the first combobox (catagory), and then to see only
related subcatagories in the 2nd (subcatagory). I know I need to link the
value from the first to a query to show only matched subcatagories, and then
to use the results in the 2nd combo, but cant get it to work. Do i need some
action to happen after the selection is made in the first combo box, to
trigger the query?

Any help much appreciated. I am newish to access, having spent most of my
time in excel vba.

Thanks a lot,

Dave
 
N

Nikos Yannacopoulos

Dave,

Assuming the rowsource of the subcat combo references the cat combo, then
you need to use an appropriate event of the cat combo, such as the Before
Update or On Change, to run a line of code like:

Me.SubcatComboName.Requery

HTH,
Nikos
 

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