It is all in the references behind the tools menu in the vb window
for instance if you imported a db from 97 to 2000 using some office90 object libraries (dao36.dll) you will get this error here is why:
2000 automatically sets the reference of ADO in its tools/references
if you import or copy code from 97 into a 2000 container even if you registered the dao3.5 or 3.6 ADO is still checked first on the list and therefore subsequent code/functions will not compile.
Check the references and look for any listed items that are marked as "missing" - reselect them and deselect anythat you may not be using - ie the ADO 2.5
This is a very common error when moving code to other apps.
qha_vn is correct as well provided you only copied a snippet of code and not everything into your new objects or db - but if you moved "everything" then check tools/references from the VB window.