title: Run query on a button click
body: <p>I am new to coding and I just need to know how to assign a SQL statement to a onclick button.</p>
  
  <p>The SQL that I have works great and does the job.</p>
  
  <pre><code>Select * From fields
  where rno ='R1';
  </code></pre>
  
  <p>And this works fine. All I want to do now is attach this SQL to a button on the form to get the same result.
  I have ADO Connection, ADO Query, and Datasource plus DBgrid1 all working fine</p>
  
  <p>Thanks</p>