Filter List Box

  • Thread starter Thread starter Ann Moller via AccessMonster.com
  • Start date Start date
A

Ann Moller via AccessMonster.com

I have a combo box that picks a vendor. I have a "list box" that I want to
list all the products for the vendor in my combo box.

I've looked at similar listings but none really answers the how to do this.

Does anyone know how I can structure this with code?

Thanks,
Ann
 
for this to work properly you need to have at least 2 tables

vendor table

vendor_id numeric
vendor_name string
......


products

product_id numeric
vendor_id numeric
description string

in the on change event for the combo box,

dim SQL as string

SQL = "Select * from products Where vendor_id=" & me.cboVendor.value

me.lstProducts.rowsource = SQL
me.lstProducts.requery

you will have to setup your list box for table/query

hope that answers you question.
 
Back
Top