Hi all,
I have a small problem that i cant figure out. i have a program that i want when a user select a date from a datetimepicker, it filters evrything from the datagridview that are for that date..
Hare is the code i have
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim oledb As System.Data.OleDb.OleDbConnection
oledb = New System.Data.OleDb.OleDbConnection()
oledb.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=CMRS.mdb;Persist Security Info=True"
oledb.Close()
oledb.Open()
Try
Dim da As New OleDb.OleDbDataAdapter("Select * FROM Medical WHERE DateAttended= " & DtDate.Text, oledb)
Dim ds As New DataSet
da.Fill(ds)
'set filter to view only medical records of certain Student
medicalFilter(ds.Tables(0).Rows(0)(0))
oledb.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
it returns an error. No data at position 0
PLEASE help ASAP