Create new Access Database in code?

pdbowling

Registered User.
Local time
Today, 15:21
Joined
Feb 14, 2003
Messages
179
Hello all.
I am curious if one could create a new and seperate Access database in code. Can this be done?
Thanks
PB
 
Nice

Wow. Fantastic, what References do I need to include to use the Workspace and Database object types?
Thanks for your help.
PB
 
I'm not sure what you mean by your question, but there are actually two different database objects that can be used. In Access 97, the DEFAULT reference is DAO, and in Access 2K and above the default is ADO.

You have to check the references to see which one is currently installed. You can install both objects, but MAKE SURE in your declarations you explicitely specify which datase object you are using.

Not:

Dim db as Database

Instead,

Dim db as ADODB.Database '(for ADO objects)

or

Dim db as DAO.Database '(for DAO objects)
 

Users who are viewing this thread

Back
Top Bottom