title: asp do while not when data not found for requested.form values and bold in last row
body: <p>I have a access query as below :</p>
  
  <pre><code>select column_date, sum(qty1), sum(qty2), sum(qty3) from table1
  where column_date = [enter date]
  group by column_date
  union all
  select 'Total' as column_date, sum(qty1), sum(qty2), sum(qty3) from table1
  where column_date = [enter date]
  </code></pre>
  
  <p>Now I have asp code as below :</p>
  
  <pre><code>&lt;%
  Dim enterdate = Request.Form("enterdate")
  set conn=Server.CreateObject("ADODB.Connection")
  conn.open "odbcdatasourcename"
  set rs = Server.CreateObject("ADODB.recordset")
  sql="abovequery '" &amp; enterdate &amp; "' "
  rs.Open sql, conn
  %&gt;
  &lt;table border="1" width="100%"&gt;
  &lt;%If rs.EOF then
  Response.write ("&lt;center&gt;" &amp; "&lt;b&gt;" &amp; "There is no records for 
  the selected dates" &amp; "&lt;/b&gt;" &amp; "&lt;/center&gt;")%&gt;
  &lt;%Else%&gt;
  &lt;tr&gt;
  &lt;%for each x in rs.Fields
  response.write("&lt;th&gt;" &amp; x.name &amp; "&lt;/th&gt;")
  next%&gt;
  &lt;/tr&gt;
  &lt;%do while not rs.EOF%&gt;
  &lt;tr&gt;
  &lt;%for each x in rs.Fields%&gt;
  &lt;td&gt;&lt;%Response.Write(x.value)%&gt;&lt;/td&gt;
  &lt;%next
   rs.MoveNext%&gt;
  &lt;/tr&gt;
  &lt;%loop%&gt;
  &lt;%End if%&gt;
  &lt;%rs.close
  conn.close%&gt;
  </code></pre>
  
  <p>As you can see I have written it should display message "There is no records for the selected dates" when there is no data for the selected date. 
  But it still displays only last row with "Total" every time there is no record i.e. second query with blank values.  Is it possible to fix it?</p>
  
  <p>And I want to make "bold" last row i.e. Total row when there is record in database for selected date. Is it possible too here? Thanks in advance</p>