I have a query that I use to open a form which is bound by an ADO recordset. I can't get the date range to work. Here's the syntax:
It keeps giving me a syntax error.
"[Microsoft][ODBC SQL Server Driver][SQL Server] Incorrect syntax near the keyword 'between'
Code:
sqlstring = SELECT [Folders].* FROM [Folders] WHERE [DateEntered] between #" & dateFrom.value & "# and #" & dateTo.value & "#"
It keeps giving me a syntax error.
"[Microsoft][ODBC SQL Server Driver][SQL Server] Incorrect syntax near the keyword 'between'