I am trying to create a new mdb file at runtime using Access 2003. I have
deployed this application using the Access 2003 Developers Extensions. On
PCs that only have the Access Runtime installed, I get an "ActiveX Component
Can't Create Object" error when trying to execute the following code:
Dim AccApp as Object
Set AccApp = CreateObject("Access.Application")
Any thoughts?
I have found a work-around for my problem. I have changed to code to:
Dim AccApp As Database
Set AccApp = DBEngine.CreateDatabase("test.mdb",dbLangGeneral)
Any ideas on why this works, and the other way doesn't?
> I am trying to create a new mdb file at runtime using Access 2003. I have
> deployed this application using the Access 2003 Developers Extensions. On
[quoted text clipped - 5 lines]
>
> Any thoughts?
Brendan Reynolds - 28 Sep 2004 17:52 GMT
Well, the first example was attempting to use the Access object model, while
the second example is using the DAO object model. Provided that Jet and DAO
are installed and registered, the second example does not require Access at
all.

Signature
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com
The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
>I have found a work-around for my problem. I have changed to code to:
>
[quoted text clipped - 15 lines]
>>
>> Any thoughts?
Right, this is a limitation of run-time - you can not initiate a new
instance of access

Signature
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
>I am trying to create a new mdb file at runtime using Access 2003. I have
> deployed this application using the Access 2003 Developers Extensions. On
[quoted text clipped - 6 lines]
>
> Any thoughts?