In this thread I decided to download the original QuizMaker demo, and convert the 2003 version to 2010. I created a new, blank database in Access 2010, then imported all of the objects.
One form ("frmTakeQuiz") uses DAO recordsets in it's VBA code. Specifically, the following lines were causing an error because there was a missing reference:
Dim dbs As Database
Set dbs = CurrentDB
The actual error (while highlighting "dbs As Database") was:
Expected user-defined type, not project
I ASSUMED that this would be fixed by adding a DAO reference. When I went to the References dialog box, the following list of DAO references was available:
Microsoft DAO 2.5/3.51 Compatibility Library
Microsoft DAO 3.51 Object Library
Microsoft DAO 3.6 Object Library
NONE of them worked. In fact, when I tried to add ANY of them, I got the following error message:
Name conflicts with existing module, project, or object library
For the record, here are the references that were checked in my new, blank database:
Visual Basic For Applications
Microsoft Access 14.0 Object Library
Microsoft Office 14.0 Access database engine Object Library
Does DAO conflict with one of these? If so, does that mean there's no need to add a reference to DAO any more?
The only reference in the 2003 database that isn't in the 2010 database is:
Microsoft ActiveX Data Objects 2.1 Library
(well, that and Microsoft DAO 3.6 Object Library)
Adding the ActiveX reference did not prevent the error. I'm guessing that reference was left over from when I was trying to use an ActiveX control, but later changed my mind, and doesn't really do anything to make the 2003 database work. (I just removed the reference from the 2003 database and tried everything I could - no problems.)
I'd like to know which reference to add to get "Dim dbs as Database" to work - if only for curiosity's sake. I bypassed it by hard-coding "CurrentDB" wherever I was using "dbs", but someday I may need to define two different databases.