J
José António Silva
There’s an Access issue that comes at least from Access 2000, related with
how to express dates in sql criteria expressions.
Access help always have been saying that date should be expressed like
#mm/dd/yy#. This is also coherent whit what we get from the design grid.
However, if we use an accde or compiled accdr file (equal with mde) this
date format always have raised an error. Actually, with Access 2007 I’m
getting Error 0 (zero), which Ҡdescription.
I’m using accdr compiled files with ODBC connections to SQL.
I’m also using Access run-time Portuguese version and computers with Windows
Portuguese versions. So, the regional date format is dd-mm-yyyy. I’m fairly
convinced that this error must have to do with this. BUT, WHAT ABOUT OTHER
LANGUAGES? For example, the UK format, which is dd/mm/yyyy.
The solution I’have ever used for this is to put in the SQL expression
datefield = CDate( “regional format†). Of course, in VBA we could walk
around ODBC and use OLEDB, where this don’t happen. But to change forms and
reports recordsource property we don’t have any other option.
Did anybody else have notice this problem? Does anybody know other solution?
Will this continue with Access 14?
This is not my first post about this. Several years ago, I asked the same
thing and I had no answers.
José António Silva
how to express dates in sql criteria expressions.
Access help always have been saying that date should be expressed like
#mm/dd/yy#. This is also coherent whit what we get from the design grid.
However, if we use an accde or compiled accdr file (equal with mde) this
date format always have raised an error. Actually, with Access 2007 I’m
getting Error 0 (zero), which Ҡdescription.
I’m using accdr compiled files with ODBC connections to SQL.
I’m also using Access run-time Portuguese version and computers with Windows
Portuguese versions. So, the regional date format is dd-mm-yyyy. I’m fairly
convinced that this error must have to do with this. BUT, WHAT ABOUT OTHER
LANGUAGES? For example, the UK format, which is dd/mm/yyyy.
The solution I’have ever used for this is to put in the SQL expression
datefield = CDate( “regional format†). Of course, in VBA we could walk
around ODBC and use OLEDB, where this don’t happen. But to change forms and
reports recordsource property we don’t have any other option.
Did anybody else have notice this problem? Does anybody know other solution?
Will this continue with Access 14?
This is not my first post about this. Several years ago, I asked the same
thing and I had no answers.
José António Silva