I ran into this one yesterday. To connect to the database you can use either ADO or DAO technology. From what I understand DAO is the older technology and is being phased out slowly. It appears that your program is using DAO and so to use it, you need to point Access to the right reference file - this is the same type of thing as import or include statements in Java, C++ or other languages.
To do this, go into the VBA editor, go up to Tools, References and then find Microsoft DAO 3.9 or something like it, and check it. After this, your program should work.
Hope that helps,