Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello all,

 

I am working on a database and I have a combo box being filled with data from one of the tables in my AccessDB. And I am wanting to select from the combo box and fill a listbox with what matches the data in the database, ex. Select artist in combo box and have the albums for that artist fill the listbox. So i'm guessing that I don't have my select statement right. This is all I have

 

Qry.CommandText = "SELECT AlbumName FROM Albums"

 

I do understand that this statement will fill all albums into the listbox, I am just trying to get the data per artist to fill the listbox.

 

All help appreciated.

 

Thanks,

J

Posted

Thanks for the reply I finally got it figured out. Here is the statment I used to make it work

 

"SELECT Albums.AlbumName FROM Artist_List INNER JOIN (Albums INNER JOIN Artist_Album_Link ON Albums.AlbumID = Artist_Album_Link.AlbumID) ON Artist_List.ArtistID = Artist_Album_Link.ArtistID WHERE Artist_List.ArtistName = '" & cmbArtist.Text & "'"

 

However I have decided I'm going perform the function with a Dataset instead.

 

Again thanks

 

J

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...