Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2005

Tip: Looking for answers? Try searching our database.

Filter List Box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ann Moller - 09 May 2005 20:42 GMT
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
Alex White MCDBA MCSE - 09 May 2005 21:08 GMT
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.

Signature

Regards

Alex White MCDBA MCSE
http://www.intralan.co.uk

>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.
[quoted text clipped - 6 lines]
> Thanks,
> Ann
Ann Moller - 09 May 2005 23:25 GMT
That Did it.  THANK YOU SO MUCH!!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.