Jacqui1811
Programmer
I am trying to gather a set of records from an access database based on a from and to date criteria.
My connection string is
DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" and mydatabase.
I know this works because I can select using other criteria fine.
My SQL reads
"select * from actions where [Target Date] >= datevalue('31/12/2002') and [Target Date] <= datevalue('05/04/2003')"
I get the error
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error. in query expression 'select * from actions where [Target Date] >= datevalue('31/12/2002') and [Target Date] <= datevalue('5/4/2003')'.
If I paste this as a query directly into the database itself and run it, it works fine.
Can anybody help me please ??
![[shadessad] [shadessad] [shadessad]](/data/assets/smilies/shadessad.gif)
Jacqui.xx
My connection string is
DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" and mydatabase.
I know this works because I can select using other criteria fine.
My SQL reads
"select * from actions where [Target Date] >= datevalue('31/12/2002') and [Target Date] <= datevalue('05/04/2003')"
I get the error
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error. in query expression 'select * from actions where [Target Date] >= datevalue('31/12/2002') and [Target Date] <= datevalue('5/4/2003')'.
If I paste this as a query directly into the database itself and run it, it works fine.
Can anybody help me please ??
![[sad] [sad] [sad]](/data/assets/smilies/sad.gif)
![[shadessad] [shadessad] [shadessad]](/data/assets/smilies/shadessad.gif)
Jacqui.xx