Connecting Tech Pros Worldwide Forums | Help | Site Map

Combo Box question

Access User
Guest
 
Posts: n/a
#1: Nov 13 '05
Here is my situation:

I have two tables linked together in a many-to-many relation through an
interum table. It looks like this...

Title TitleTopic Topic
----- ---------- -----
TitleKey-------| TitleTopicKey |--------TopicKey
TitleName |-----TitleID | TopicName
CreationDate TopicID------------| CreationDate
etc... etc...

I have two combo boxes. The first shows all records in the Title table,
no problem there. I want the second combo box to display the related
records in the Topic table based on what the user selects in the first
combo box. How do I go through the interum table to get the related
selection of the Topic table loaded into the second combo box??

Thanks!

Paul

fredg
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Combo Box question


On Sun, 06 Feb 2005 16:59:04 -0600, Access User wrote:
[color=blue]
> Here is my situation:
>
> I have two tables linked together in a many-to-many relation through an
> interum table. It looks like this...
>
> Title TitleTopic Topic
> ----- ---------- -----
> TitleKey-------| TitleTopicKey |--------TopicKey
> TitleName |-----TitleID | TopicName
> CreationDate TopicID------------| CreationDate
> etc... etc...
>
> I have two combo boxes. The first shows all records in the Title table,
> no problem there. I want the second combo box to display the related
> records in the Topic table based on what the user selects in the first
> combo box. How do I go through the interum table to get the related
> selection of the Topic table loaded into the second combo box??
>
> Thanks!
>
> Paul[/color]

Change the table and field names as needed.

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 also.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Closed Thread


Similar Microsoft Access / VBA bytes