Yeah,

You need to reference Microsoft Active X Data Object 2.X library. Try this and then run the code.

Also just a side note, to get data from the database your recordsets should look something like this:

Code:
dim RS as New Recordset
RS.Open "SELECT * FROM table",DB,adOpenForwardOnly,adLockReadOnly
Hope this helps