Try:
Dim dbs As Database, rst As DAO.Recordset, X As Integer, strName As
String
Both the DAO library and the ADO library have a Recordset object. If you do
not specify which one you want, you get whichever one is listed first under
Tools | References (from a code window.)
You can solve the problem by any of the following:
a) Remove the ADO library if you don't need it.
b) Move the DAO library above ADO so it has a higher priority.
c) Explicitly disambiguate, as in the example above.
More info on which references are needed for which versions of Access:
http://allenbrowne.com/ser-38.html

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I call this procedure from the Report_Open event, and am getting the error
>shown on the 6th line below.
[quoted text clipped - 16 lines]
> Set dbs = Nothing
> End Sub
bw - 04 Dec 2005 13:30 GMT
Thanks,Allen!
I was going to follow up with more questions about this, but I guess you new
I would, and so included the link to your explanation for "Solving Problems
with Library References".
As always, I appreciate your help.
Bernie
> Try:
> Dim dbs As Database, rst As DAO.Recordset, X As Integer, strName As
[quoted text clipped - 32 lines]
>> Set dbs = Nothing
>> End Sub