thankyou, however created a temp table to store the records required as follow. this seems to work fine.
sSql = "SELECT DISTINCT InvoiceItem.dbinvoiceno, Invoice.dbdispinvoiceNo, Invoice.dbinvdate, Invoice.dbpayername, [dbgivenname]+' '+[dbsurname] AS dbpatient, Invoice.dbdob, Invoice.dbtotal...