I can keep getting 'data type mismatch on citerio expression' Because TimeOfOrder is a data/time in the access, i tried converting it to a string. It didnt work as well. So then i tried removing that field to find the source of the problem the same error still appears. This is my code so far:
Private Sub Lists_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Lists.SelectedIndexChanged
Dim Sql As String
Dim data As dbase.OleDbDataReader
Dim cmd As dbase.OleDbCommand
conn.Open() ' start the connection
Sql = "select * from corder where OrderID = """ & Lists.Text & """"
cmd = New dbase.OleDbCommand(Sql, conn) ' how the commad is run on this connection
data = cmd.ExecuteReader
data.Read()
TextBox1.Text = data("TableNumber")
TextBox2.Text = data("Status")
TextBox3.Text = data("TimeOfOrder".ToString("f"))
textbox4.text = data("Orders")
conn.Close()
End Sub