title: Is there a workaround in VBA for sql queries with no results?
body: <p>I have a VBA program in which part of it queries our SQL servers and returns specific data.  The problem is that the data isn't necessarily always there, which is expected.  I need to query the database asking for specific data, and if it isn't there then I want the program to ignore it and move on.  Unfortunately, when I hit a record without data I get the following error:</p>
  
  <blockquote>
    <p>Run-time error '3021': <br>
    Either BOF or EOF is True, or the current record has been deleted.</p>
  </blockquote>
  
  <p>a.k.a. there's no record.  Is there a way, without using on error, to either </p>
  
  <ol>
  <li>Determine which the data is present, OR </li>
  <li>just have it return a null string/recordset/<em>anything</em> other than an error?</li>
  </ol>