Hello all,
I have 2 related tables, the first table is called "Artist", the second is "Albums". The relationship is a 1-to-many, where 1 Artist has many Albums, therefore the Primary and Foreign keys are ArtistID in both tables.
What I'm trying to do is display all the Artists in a combobox and then display the related Albums in a listbox.
When the user selects an Artist from the combobox, I want to use the ArtistID to search for all the related Albums, however, I don't know how to set up the query to use the ArtistID to find the Albums from the second table.
I used a DataTable and the .DataSource property of the ComboBox to display the Artists.
This is my first attempt at a multi-table query, so please bear with me if this seems simple.
Any advice, or even an example of how to do this is greatly appreciated,
Thanx,
Cheers,
ziggy1971
I have 2 related tables, the first table is called "Artist", the second is "Albums". The relationship is a 1-to-many, where 1 Artist has many Albums, therefore the Primary and Foreign keys are ArtistID in both tables.
What I'm trying to do is display all the Artists in a combobox and then display the related Albums in a listbox.
When the user selects an Artist from the combobox, I want to use the ArtistID to search for all the related Albums, however, I don't know how to set up the query to use the ArtistID to find the Albums from the second table.
I used a DataTable and the .DataSource property of the ComboBox to display the Artists.
This is my first attempt at a multi-table query, so please bear with me if this seems simple.
Any advice, or even an example of how to do this is greatly appreciated,
Thanx,
Cheers,
ziggy1971