title: Total Contiguous Days. How can I know if Date+1 exists?
body: <p>Ive a table with dates of absence per day and type of absences. How can I find total of contiguous days for an absence e.g. Illness.</p>
  
  <p>Ive tried with <code>DCount</code> but it's ok with 10 records but with 400 records very very slow:</p>
  
  <pre><code>sSQL = "[Employee Number] = " &amp; nP &amp; " And [Leave] = """ &amp; lve &amp; """ And [Date_Leave] = #" &amp; Format(DateAdd("d", n, d1), "yyyy-mm-dd") &amp; "#"
  If Nz(DCount("*", "Employee_Data", sSQL)) = 0 Then
              nbJ = n
  </code></pre>
  
  <p>How can I replace <code>DCount</code> with a DAO code?</p>