stanbuggy
Member
- Joined
- Oct 25, 2010
- Messages
- 18
- Programming Experience
- Beginner
Hi Guys,
Working on an application using MS Access s my DB. when i try to query my database using the datetime picker i get this error "Data type mismatch in criteria expression."
Below is my code
Pls what could be wrong with my code and why the error.
Thanks
Working on an application using MS Access s my DB. when i try to query my database using the datetime picker i get this error "Data type mismatch in criteria expression."
Below is my code
VB.NET:
cmd = New OleDbCommand("Select * from members where date_reg between '" + Format(dtpfrom.Value, "yyyy/MM/dd") + "' and '" + Format(dtpto.Value, "yyyy/MM/dd") + "'", cn)
Pls what could be wrong with my code and why the error.
Thanks