Search results

  1. M

    Date format for WHERE clause

    You're right, it wasn't working properly, but there was no error. It switched the day and month around as the month wasn't valid. When I ran it for 07/09/2016 it was using the 9th day of July. I can't think why installing the Office suite solved it, but it did. Many thanks for your help. Matt
  2. M

    Date format for WHERE clause

    I've solved it now thanks. Although I know how, I still don't know what the problem was. I installed the Office suite on the user pc and the reports magically worked. Weird! Thank you very much for your assistance. Matt
  3. M

    Date format for WHERE clause

    It's in a VBA code where condition, as per: DoCmd.OpenReport "ReportName", acViewPreview, , "SomeDateField > #29/08/2016#" or DoCmd.OpenReport "ReportName", acViewPreview, , "SomeDateField > #2016-08-29#" It worked fine in the compiled adp, but not the accdb.
  4. M

    Date format for WHERE clause

    Yes, the data is updatable and just about everything else works on the users machine. It's quite a large database with over 200 tables and 700 views, so I'd quickly notice if things were not right. I can open reports with other criteria in the where clause, it's just dates that are the problem...
  5. M

    Date format for WHERE clause

    They are datetime or smalldatetime fields in the sql tables.
  6. M

    Date format for WHERE clause

    I agree, it does sound like SQL is processing it somehow. I've tried it using apostrophes instead of the hash key, in all combinations of day, month and year, with slashes and hyphens. Whatever order/delimiter I use I always get the error: Data type mismatch in criteria expression.
  7. M

    Date format for WHERE clause

    Sorry, by sql clients do you mean front ends? They are using the same front end, after compiling it and copying it to their machines as they use Access Runtime, connecting to the same sql database. The compiled front end works on my pc too, under both Runtime and full Access.
  8. M

    Date format for WHERE clause

    I'm converting an Access project (adp) over to a linked table (accdb) front end with an ODBC connection to the SQL Server data and am having problems opening reports that have date criteria in their WHERE clause. I've tried the following syntax in the WHERE clause: ReportDate > #dd/mm/yyyy#...
  9. M

    My intro

    Hi I live in Hampshire UK and work for a small(ish) company in West Sussex. I have been developing with Access for about 20 years, so I started with Access 7.0. I almost exclusively use it as a front end hooked up to SQL Server databases. I'm also the DBA and developer for the back end data...
Top Bottom