For some reason, this query isn't returning any records:
sql = "Select * from tblTrans where tblTrans.DOS BETWEEN " & dtpStart.Value.ToShortDateString & " AND " & dtpEnd.Value.ToShortDateString
The tblTrans has a field called DOS. That field is updated in another part of the application using the ToShortDateString. So, on one form I created two DateTimePicker components, and set the dates to where I know there is a valid record for that time. However, it won't return a record. I even tried hardcoding it to read:
sql = "Select * from tblTrans where tblTrans.DOS = 10/18/2006"
I know there is a record for that date, yet, it doesn't return anything. The DOS field is a date field. The data is an Access database. Why am I having such a hard time with this? lol
sql = "Select * from tblTrans where tblTrans.DOS BETWEEN " & dtpStart.Value.ToShortDateString & " AND " & dtpEnd.Value.ToShortDateString
The tblTrans has a field called DOS. That field is updated in another part of the application using the ToShortDateString. So, on one form I created two DateTimePicker components, and set the dates to where I know there is a valid record for that time. However, it won't return a record. I even tried hardcoding it to read:
sql = "Select * from tblTrans where tblTrans.DOS = 10/18/2006"
I know there is a record for that date, yet, it doesn't return anything. The DOS field is a date field. The data is an Access database. Why am I having such a hard time with this? lol