I think that Access 2000 defaults to using ADO. The code that I wrote was in DAO.
Change the code like this:
dim db as DAO.database
dim qdf as DAO.querydef
Also, make sure that a reference is set to the Microsoft DAO 3.51 Object Library (you can set it the 3.6 library instead). You can find the references when opening a VBA module and choosing Tools-> References, then scroll down until you find the MS DAO 3.51 Object Library.
Rob