References change when using CreateDatabasem ?

  • Thread starter Thread starter Kevin Robson via AccessMonster.com
  • Start date Start date
K

Kevin Robson via AccessMonster.com

I am struggling with what should be a simple task:

I have a working A2K database that uses the following references:

Visual Basic For Applications
Microsoft Access 9.0 Object Library
Microsoft DAO 3.6 Object Library
OLE Automation
Microsoft Visual Basic for Applications Extensibility 5.3

Question 1:

What references should I have, are these the standard References for A2K or
have I got a non-standard set?


Question 2:

The database saves a selection of its data to an external database file -
filename.mdb, which is used by another programme.

When I create this database using:
Set MyDbase = DBEngine.Workspace(1).CreateDatabase.(MyFileName, dbLangGeneral)


The database creates OK and I can load the necesary tables and data into it,
no problem. Having closed the main application, I click on the new database
to open it in the standard manner. It opens OK and the tables / data are fine.


But, the references for this new database are now:

Visual Basic For Applications
Microsoft Access 9.0 Object Library
OLE Automation
Microsoft ActiveX Data Object 2.1 Library

Why have they changed?
Have I missed something in the create sequence to replicate the references of
the Master programme?

I have searched the forum but can find no assistance.

Any help would be appreciated. Thanks.
 
Kevin Robson via AccessMonster.com said:
I have a working A2K database that uses the following references:

Visual Basic For Applications
Microsoft Access 9.0 Object Library
Microsoft DAO 3.6 Object Library
OLE Automation
Microsoft Visual Basic for Applications Extensibility 5.3

Question 1:

What references should I have, are these the standard References for A2K
or
have I got a non-standard set?

Yes, you have a non-standard set.
Question 2:

The database saves a selection of its data to an external database file -
filename.mdb, which is used by another programme.

When I create this database using:
Set MyDbase = DBEngine.Workspace(1).CreateDatabase.(MyFileName,
dbLangGeneral)


The database creates OK and I can load the necesary tables and data into
it,
no problem. Having closed the main application, I click on the new
database
to open it in the standard manner. It opens OK and the tables / data are
fine.


But, the references for this new database are now:

Visual Basic For Applications
Microsoft Access 9.0 Object Library
OLE Automation
Microsoft ActiveX Data Object 2.1 Library

Those are the standard references for Access 2000
Why have they changed?
Have I missed something in the create sequence to replicate the references
of
the Master programme?

You haven't missed anything: any new database you create will always have
the default references. You could use automation to add or remove from the
References collection if you need to.
 
Douglas,
Many thanks for the quick reply.
Now I know I will stop looking for my usual programming errors!!
I will add the extra References programatically as you suggest.

Thanks again,
Kevin.
 
Back
Top