i have this peice of code to populate an MSHFlexGird with the data in a table that matches combo1 AND combo2.

VB Code:
  1. adoRecordset.Open "SELECT clientid,mtype,amount,datereceived, SUM(amount) AS totals FROM history GROUP BY clientid,mtype,amount,datereceived HAVING mtype = '" & Combo2.Text & "' AND datereceived = '" & Combo1.Text & "'", adoConnection
  2.  
  3. Set MSHFlexGrid1.DataSource = adoRecordset

This code works perfectly ... it only returns rows that match BOTH mtype and datereceived;
My next goal is to take the total of all the amounts found in this search and put it into Text1.text. I am a bit confused as to how to tell VB that i want SUM(amount) to paste to the text box ... any suggestions ?