You have to reference either Microsoft DAO Object library or Microsoft ActiveX Data Objects Library (for ADO).
When in VBE, menu Tools -> References ...
And feel free to strong typing to avoid ambiguity:
Dim rst As DAO.Recordset
or
Dim rst As ADODB.Recordset
Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244