Re: Filter List Box
- From: "Alex White MCDBA MCSE" <alex@xxxxxxxxxxxxxx>
- Date: Mon, 9 May 2005 21:08:36 +0100
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.
--
Regards
Alex White MCDBA MCSE
http://www.intralan.co.uk
"Ann Moller via AccessMonster.com" <forum@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:df169ece58b648f8b810a4fa71211c0c@xxxxxxxxxxxxxxxxxxxx
>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
>
> --
> Message posted via http://www.accessmonster.com
.
- Follow-Ups:
- Re: Filter List Box
- From: Ann Moller via AccessMonster.com
- Re: Filter List Box
- References:
- Filter List Box
- From: Ann Moller via AccessMonster.com
- Filter List Box
- Prev by Date: Re: Custom Message When Record is Locked
- Next by Date: RE: Availability of Control Value when updated from another form
- Previous by thread: Filter List Box
- Next by thread: Re: Filter List Box
- Index(es):
Relevant Pages
|