In the CRecordSet object's GetDefaultSQL member. Remember, you can change the string held here to manipulate your table.