title: How to check are there any records in recordset in VBA?
body: <p>Could you help me, please. I have a database in Access and a program written in Delphi (I've used the library Ehlib), which I'm trying to rewrite in the VBA.</p>
  
  <pre><code>with CustomDriver do
    try
      with SelectCommand do
      begin
        CommandText.Text := 'select count(*) from OBJ_APP a' + ^M +
                            'where ID_App = :AID_App and exists (select 1 from obj_app b where b.ID_Obj = a.ID_Obj and b.ID_App = :AID_App_Replace)';
        Parameters.ParamByName('AID_App').Value := AID_App;
        Parameters.ParamByName('AID_App_Replace').Value := AID_App_Replace;
      end;
      vFree := True;
      ExecuteCommand(SelectCommand, DsReplace, vFree);
  if (DsReplace &lt;&gt; Nil)
  and(DsReplace.RecordCount &gt; 0)
  and(DsReplace.Fields[0].AsInteger &gt; 0) then
  </code></pre>
  
  <p>How do I write the last three lines of code in VBA? And is there an easier way to write double quotes than <code>&amp; Chr (34) &amp;</code>? </p>