I have an Access 2010 accdb database, which I converted from an Access 2003 mdb database.
When I ran the following code in Access 2003, it would create a database that, by default, had a reference to ADODB - "Microsoft ActiveX Data Objects 2.5 Library" (msado25.tlb).
Set dbNewApp = Application.DBEngine.CreateDatabase("Test.mdb", dbLangGeneral)
If I run the following (similar) code in Access 2010, it successfully creates an accdb database, but there is no reference to the ADODB library as above.
Set dbNewApp = Application.DBEngine.CreateDatabase("Test.accdb", dbLangGeneral)
According to the following link, the default references included when you create a new database has changed between DAO and ADODB and back again over the various versions of Access: http://allenbrowne.com/ser-38.html
So I need my newly created database to have a reference to ADODB.
I know how to change the references of the current db...
Set refNew = References.AddFromGuid("{00000205-0000-0010-8000-00AA006D2EA4}", 2, 5)
But how do I do this to another access database that I just created with DBEngine.CreateDatabase?