title: Date conversion error - MS Access front end querying sql back end
body: <p>I am getting a date conversion error when trying to execute SQL from and an Access database against a SQL database.  Our machines are all running windows 7 with office 2010.  The front end is an accde.</p>
  
  <p>There is a search form in the database and all the fields work fine, except the two date fields.</p>
  
  <p>The query's where clause looks like this in the front ends VB code</p>
  
  <pre><code>"WHERE DrawnDate BETWEEN #" &amp; Format(FromDate, "yyyy-mm-dd") &amp; "# AND #" &amp; _
      Format(ToDate, "yyyy-mm-dd") &amp; "#"
  </code></pre>
  
  <p>Based on some research, I have also tried date formats of <code>dd-mon-yyyy</code> and <code>dd-mm-yyyy</code> with no change in outcome.</p>
  
  <blockquote>
    <p>The expression On Click you entered as the event property setting produced the following error: ODBC -- call failed.</p>
  </blockquote>
  
  <p>The error received is:</p>
  
  <blockquote>
    <p>[Microsoft][ODBC SQL Server Driver][SQL Server]Conversion failed when converting date and/ or time from character string. (#241)</p>
  </blockquote>
  
  <p>The other problem is that this only happens on one PC so far and not on mine or others that I have tested.  </p>