this is the code and it work fine
- Code: Select all
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
Dim sql1 As String = "select Verse1 from Bible where ChapterNum =" & Val(ComboBox2.Text)
Dim data2 As New OleDbDataAdapter(sql1, CON)
Dim ds1 As New DataSet
ds1.Clear()
data2.Fill(ds1, "Bible")
CON.Close()
DataGridView1.DataSource = ds1
DataGridView1.DataMember = "Bible"
but the problem is that the datagrid display the whole verses column for the whole bible
and when i change the code to
- Code: Select all
DataGridView1.DataMember = ("Bible,ChapterNum")
the datagrid display nothing
how to fix this and make the datagrid display the verses for chapter i only choose in combobox2 not the verses for the whole bible



