hi, All
I am trying to achieve a simple programming task ie; when the user selects
an item from the comboBox ,the relevant data should be displayed in the
grid. I am using Publisher & Titles tables of Biblo.mdb as an example,
where in Publisher names are displayed in the cmbox and all the titles
related to each are disaplyed in the grid.This is what i am doing but
nothing is displayed in the grid . Can someone advise pl.
'fill the dataset & Create a relation
daPublishers.Fill(dsBiblo, "Publishers")
daTitles.Fill(dsBiblo, "Titles")
dsBiblo.Relations.Add( _
"PubTitles", dsBiblo.Tables("Publishers").Columns("PubID"), _
dsBiblo.Tables("Titles").Columns("PubID"))
cn.Close()
ComboBox1.DisplayMember = "Name"
ComboBox1.ValueMember = "PubID"
ComboBox1.DataSource = dsBiblo.Tables("Publishers")
ComboBox1.DataBindings.Add("SelectedValue", dsBiblo.Tables("Titles"),
"PubID")
gridTitles.DataSource = dsBiblo
gridTitles.DataMember = "publishers.pubTitles" 'using th relation above
TIA
Irfan