Just so you are aware, under certain conditions ADO will return -1 as the recordcount even though there are records returned, so you would be better off checking that rst.EOF and rst.BOF are not both true to determine whether the recordset is empty.