ActiveX Component Can't Create Object Error

rileyjm

Registered User.
Local time
Yesterday, 22:14
Joined
Feb 14, 2011
Messages
18
My database works just fine on my hard drive but when I go to run it on the server, I receive the error:

'ActiveX Component Can't Create Object'


Here's the line of code that triggers the error:

Set appWord = GetObject(, "Word.Application")

Any suggestions for this? I don't own the server so I can't make any updates there.
 
When you say "when I go to run it on the server" do you mean you are actually going to the server and running the database? Or are you meaning that you move it to the server and then run it across the network?

A couple of things before answering -

1. The database should be split - backend (tables only) on the server and a copy of the frontend on EACH user's machine. Trying to run an unsplit database across a network with multiple users (even with one user) is playing Russian Roulette with your data. Chances for corruption are extremely high in that scenario.

2. If it is actually being run ON the server then is Word installed? Most servers don't have Office installed on them.

3. GetObject is basically for getting an open instance of the application. Normally there really isn't a need to do that. Just use CreateObject instead. The syntax is

Set appWord = CreateObject ("Word.Application")

Using GetObject will error out if an instance is not open but you can use CreateObject any time, even if there is an instance open.

4. Do you have sufficient rights on the machine?
 
Last edited:
Set appWord = CreateObject ("Word.Application") worked!! Thank you.

I meant I was copy the entire database (front end and data) over to a shared network drive vs. my hard drive.
 
I meant I was copy the entire database (front end and data) over to a shared network drive vs. my hard drive.

Remember - the backend goes on the server and the frontend goes on your hard drive (and if anyone else uses it they need a copy of the frontend on their hard drive as well).
 

Users who are viewing this thread

Back
Top Bottom