Private Sub btnserchdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnserchdate.Click
sb.Remove(0, sb.Length)
sb.Append("SELECT * FROM Saledetail")
sb.Append(" WHERE day_s='" & txtdate1.Text & "' BETWEEN '" & txtdate2.Text & "'")
sb.Append(" ORDER BY sales_id ASC")
Dim sqlEmployee As String = sb.ToString()
Dim dr As OleDbDataReader
Dim dt As DataTable
Com = New OleDbCommand()
With Com
.CommandType = CommandType.Text
.CommandText = sqlEmployee
.Connection = Conn
dr = .ExecuteReader()
If dr.HasRows Then
dt = New DataTable()
dt.Load(dr)
DataGridView1.DataSource = dt
Else
DataGridView1.DataSource = Nothing
End If
End With
dr.Close()