RTSwimmer
New member
How can i find the ID Key if i have the object its referenced to.
Ill try to explain more...
I'm creating an app that looks into a MS Access database and find information such as filmTitle (which is listed in a listbox) when the filmtitle is selected it then shows a list of cast actors in the second listbox.
My problem is that i need to find the ID key of the film title
for example i know "Armageddon" has a ID key of 20 but how can i find out dynamically, in other words can i select a film title from the list box and it output the ID Key in the database (not the selected index value)
lstFilmTile - DataSource = DsTitles
lstFilmTile - DataMember = tblDvdItem.fldTitle
I hope someone understands my problem, if it makes it easier ill give you access to the project files so you can see what i mean
Thanks RTSwimmer
Ill try to explain more...
I'm creating an app that looks into a MS Access database and find information such as filmTitle (which is listed in a listbox) when the filmtitle is selected it then shows a list of cast actors in the second listbox.
My problem is that i need to find the ID key of the film title
for example i know "Armageddon" has a ID key of 20 but how can i find out dynamically, in other words can i select a film title from the list box and it output the ID Key in the database (not the selected index value)
lstFilmTile - DataSource = DsTitles
lstFilmTile - DataMember = tblDvdItem.fldTitle
VB.NET:
Private Sub loadTitles()
DsTitles.Clear()
adaptTitle.Fill(DsTitles)
End Sub
Private Sub loadCastList()
lstCurrCast.Items.Clear() 'empty the listbox
DsCastList.Clear() 'empty the dataset
adaptCastList.SelectCommand.Parameters(0).Value = lstFilmTitle.SelectedValue 'select which dvd title to search for
adaptCastList.Fill(DsCastList)
For Each tempRow As DataRow In DsCastList.Tables(2).Rows
lstCurrCast.Items.Add(tempRow(0) & " " & tempRow(1)) '0="fldActorName1st" 1="fldActorNameLast"
Next
End Sub
Thanks RTSwimmer