You didn't mention the error but since you are on Access 2000 and I did mine in Access 97 I bet you do not have the reference to ADO checked. Start a new module and then go to Tools > References and make sure Microsoft DAO 3.6 Object Library is turned on.
I just tried the code on a Access 2000...