DAO 3.6

G

Guest

How can I append / select / check the Microsoft DAO 3.6 Library externally,
from a separate access database.

I have created an access database programmatically but it (the new database)
is lacking the DAO 3.6 library.

Thanks

Ross
 
D

Dirk Goldgar

Ross said:
How can I append / select / check the Microsoft DAO 3.6 Library
externally, from a separate access database.

I have created an access database programmatically but it (the new
database) is lacking the DAO 3.6 library.

There may be another way, but I see that one can do it by opening the
database in another instance of Access and then appending to the
References collection in that instance. For example, I tested this:

'----- start of test code -----
Sub TestMakeMDBAddReference()

Dim app As Access.Application
Dim ref As References

Set app = New Access.Application
app.NewCurrentDatabase "C:\Temp\TestMakeMDBAddReference.mdb"
app.References.AddFromFile References("DAO").FullPath
app.CloseCurrentDatabase
app.Quit
Set app = Nothing

End Sub

'----- end of test code -----

After running the routine, I opened the newly created database
"C:\Temp\TestMakeMDBAddReference.mdb" in Access and checked its
references, and the DAO 3.6 reference was there.

Note that I knew that the database I ran this code in has a reference to
DAO already set, so that I could easily get the path to the dao360.dll
file (which in my case at least is "C:\Program Files\Common
Files\Microsoft Shared\DAO\dao360.dll".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top