I have a Database where one table is called OrderHead. There are various fields where two of them is OrderTotalAmount and DateOfOrder. I just need to filter my orders via Dates and get the relevant Total Amounts. I am using the following query and get error Run Time 3464 (Data mismatch).
txtFrom and txtTo are two text fields where the user can enter the date range.
Here is the query:
strSQL = "SELECT Sum(OrderTotalAmount) from OrderHead where DateOfOrder between '" & Format(txtFrom.text, "dd/mm/yyyy") & "' AND '" & Format(txtTo.text, "dd/mm/yyyy") & "'"
Please help!
This post has been edited by modi123_1: 17 August 2011 - 06:53 AM
Reason for edit:: please use code tags

New Topic/Question
Reply



MultiQuote






|