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 / April 2005

Tip: Looking for answers? Try searching our database.

One list box to control the cource of another list box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Artisan7 - 08 Apr 2005 00:17 GMT
I have been trying to have one list box set the row source of another list
box, without success in Access 2003.
Example: control "A" has a list of products-rowsource from a table.
Selecting a
procuct will change the rowsource of Control "B" to a different list in
another table.

It seems simple enough, but I can't find instructions on it. Should it be in
vb code and if so where should the code go or is it something that can be set
in properties?
Thanks,
Cliff
fredg - 08 Apr 2005 00:35 GMT
> I have been trying to have one list box set the row source of another list
> box, without success in Access 2003.
[quoted text clipped - 8 lines]
> Thanks,
> Cliff

The following refers to a combo box, but the List box would work the
same.

Leave the rowsource of the 2nd combo box blank.
Code the AfterUpdate event of the 1st combo box to fill the rowsource
of the 2nd.
Something like this:

Combo2.Rowsource = "Select Instructors.InstructorID,
Instructors.InstructorName from Instructors Where Instructors.ClassID
= " & Me!ComboName & ";"

Change the table and field names as needed.
The above assumes ClassID is a Number datatype and the combo box BOUND
column is Number datatype also.

Signature

Fred
Please only reply to this newsgroup.
I do not reply to personal email.

 
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.