Automation Error 
Author Message
 Automation Error

I have cross-posted this to several MS Access newsgroups hoping someone will
have the answer.

I have scoured the newsgroups and have found similar postings, but nothing
suggested seems to help, only make things worse.

Here is the problem.  I converted a database from Access 2.0 to 97 and
replaced all macros with code.  I did a lot of modification on the database.
When I finished everything, I chose "Compile and Save All Modules" from the
module "Debug" Menu.  It then returned the error "Automation Error" with OK
and Help.  Help took me to error 440, which was no help at all.  The
interesting thing is that if I compiled and saved all errors individually,
there was no problem, only when I compiled and saved all.    Now, however, I
don't think I can do that anymore.  Also, it did not bring up the offending
module or offer to help me debug it.

The situation is getting worser and worser, as my 4 year-old might say.

Here are a list of solutions that I found on the newsgroups and tried.

1)    Tried adding "Option Explicit" to the beginning of all modules.
However, all of my variables were declared explicitly anyway.  I abandoned
that idea when it would not allow me to modify one of the modules.

2)    Thought I found the offending form, assumed it was corrupted, and
duplicated it.I then copied and pasted all objects and modules to the new
form.  That worked great. . .for five seconds.  Closed the database, opened
it back up and, voila, automation error.

3)    Changed the reference library from Microsoft DAO 2.5/3.51
Compatibility Library (dao2535.tlb) to Microsoft DAO 3.51 object library
(dao350.dll).  It wouldn't let me choose both.  Also chosen are Visual Basic
for Applications, utility, and Microsoft Office 8.0 object library.

When I tried to recompile using the new library selected, I received the
same error message.  When I tried to change it back to DAO 2.5/3.51, it
wouldn't let me.

I am at my wit's end.  Can anyone tell me anything about what is going on?
I've been doing Access a long time and I have not run into this before.



Tue, 25 Dec 2001 03:00:00 GMT  
 Automation Error
A short follow-up.

1)    I neglected to mention that I also created a new database and imported
ALL objects.  This did not work either.

2)    Now the code does not execute properly at all.  When I try to compile
it or run the app in run-time, I get a Compile Error which says, "Only
comments may appear after End Sub, End Function, or End Property."

The problem is that the error is referring to a perfectly legal sub routine
within the form module.  In other words, the syntax goes something like
this:

End Sub

'-------------------------
' Comment Block
'-------------------------

Private Sub cmdGoTo Company_Click()

For some reason my code is completely hosed without any real changes being
made to it.  Is my database corrupted?



Tue, 25 Dec 2001 03:00:00 GMT  
 Automation Error
try creating a new (empty database) and manually copying the code and the
forms in

Quote:

> I have cross-posted this to several MS Access newsgroups hoping someone
will
> have the answer.

> I have scoured the newsgroups and have found similar postings, but nothing
> suggested seems to help, only make things worse.

> Here is the problem.  I converted a database from Access 2.0 to 97 and
> replaced all macros with code.  I did a lot of modification on the
database.
> When I finished everything, I chose "Compile and Save All Modules" from
the
> module "Debug" Menu.  It then returned the error "Automation Error" with
OK
> and Help.  Help took me to error 440, which was no help at all.  The
> interesting thing is that if I compiled and saved all errors individually,
> there was no problem, only when I compiled and saved all.    Now, however,
I
> don't think I can do that anymore.  Also, it did not bring up the
offending
> module or offer to help me debug it.

> The situation is getting worser and worser, as my 4 year-old might say.

> Here are a list of solutions that I found on the newsgroups and tried.

> 1)    Tried adding "Option Explicit" to the beginning of all modules.
> However, all of my variables were declared explicitly anyway.  I abandoned
> that idea when it would not allow me to modify one of the modules.

> 2)    Thought I found the offending form, assumed it was corrupted, and
> duplicated it.I then copied and pasted all objects and modules to the new
> form.  That worked great. . .for five seconds.  Closed the database,
opened
> it back up and, voila, automation error.

> 3)    Changed the reference library from Microsoft DAO 2.5/3.51
> Compatibility Library (dao2535.tlb) to Microsoft DAO 3.51 object library
> (dao350.dll).  It wouldn't let me choose both.  Also chosen are Visual
Basic
> for Applications, utility, and Microsoft Office 8.0 object library.

> When I tried to recompile using the new library selected, I received the
> same error message.  When I tried to change it back to DAO 2.5/3.51, it
> wouldn't let me.

> I am at my wit's end.  Can anyone tell me anything about what is going on?
> I've been doing Access a long time and I have not run into this before.



Wed, 26 Dec 2001 03:00:00 GMT  
 Automation Error
You probably don't need the reference to Utility.

Also, you could try opening a copy of the database from the command
line or from a shortcut, using the Decompile switch:
The command line should contain the path to msaccess.exe in quotes,
space, the path to your mdb in quotes, space, /decompile
like this, on one lin:
"C:\Program Files\Office97\Office\MSACCESS.EXE"
"C:\projects\morgan\ssgprog.mdb" /decompile

That may allow you to compile and save successfully.

 -- Andy

Quote:

>I have cross-posted this to several MS Access newsgroups hoping someone will
>have the answer.

>I have scoured the newsgroups and have found similar postings, but nothing
>suggested seems to help, only make things worse.

>Here is the problem.  I converted a database from Access 2.0 to 97 and
>replaced all macros with code.  I did a lot of modification on the database.
>When I finished everything, I chose "Compile and Save All Modules" from the
>module "Debug" Menu.  It then returned the error "Automation Error" with OK
>and Help.  Help took me to error 440, which was no help at all.  The
>interesting thing is that if I compiled and saved all errors individually,
>there was no problem, only when I compiled and saved all.    Now, however, I
>don't think I can do that anymore.  Also, it did not bring up the offending
>module or offer to help me debug it.

>The situation is getting worser and worser, as my 4 year-old might say.

>Here are a list of solutions that I found on the newsgroups and tried.

>1)    Tried adding "Option Explicit" to the beginning of all modules.
>However, all of my variables were declared explicitly anyway.  I abandoned
>that idea when it would not allow me to modify one of the modules.

>2)    Thought I found the offending form, assumed it was corrupted, and
>duplicated it.I then copied and pasted all objects and modules to the new
>form.  That worked great. . .for five seconds.  Closed the database, opened
>it back up and, voila, automation error.

>3)    Changed the reference library from Microsoft DAO 2.5/3.51
>Compatibility Library (dao2535.tlb) to Microsoft DAO 3.51 object library
>(dao350.dll).  It wouldn't let me choose both.  Also chosen are Visual Basic
>for Applications, utility, and Microsoft Office 8.0 object library.

>When I tried to recompile using the new library selected, I received the
>same error message.  When I tried to change it back to DAO 2.5/3.51, it
>wouldn't let me.

>I am at my wit's end.  Can anyone tell me anything about what is going on?
>I've been doing Access a long time and I have not run into this before.



Thu, 27 Dec 2001 03:00:00 GMT  
 Automation Error
Unless you made a typo in what you've got below, it appears to be an
invalid statement. You've got a blank between cmdGoto and Company_Click.

Quote:

> The problem is that the error is referring to a perfectly legal sub routine
> within the form module.  In other words, the syntax goes something like
> this:

> End Sub

> '-------------------------
> ' Comment Block
> '-------------------------

> Private Sub cmdGoTo Company_Click()

> For some reason my code is completely hosed without any real changes being
> made to it.  Is my database corrupted?

--

Beer, Wine and Database Programming.  What could be better?
Visit "Doug Steele's Beer and Programming Emporium"
http://webhome.idirect.com/~djsteele/



Thu, 27 Dec 2001 03:00:00 GMT  
 Automation Error
Hi Ed!

    Have you tried to use the "Compile Loaded Module" button? (It's the one
with the stack of pappers with arrow seemingly pushing down icon.) It'll
compile your code line by line picking out the subtle error(s) you may have
in your code. I also had trouble compiling my database and actually spent a
week going  through things form by form until coming across this useful, but
frequenly overlooked icon.

Regards, Al.

someone will
have the answer.

I have scoured the newsgroups and have found similar postings, but nothing
suggested seems to help, only make things worse.

Here is the problem.  I converted a database from Access 2.0 to 97 and
replaced all macros with code.  I did a lot of modification on the database.
When I finished everything, I chose "Compile and Save All Modules" from the
module "Debug" Menu.  It then returned the error "Automation Error" with OK
and Help.  Help took me to error 440, which was no help at all.  The
interesting thing is that if I compiled and saved all errors individually,
there was no problem, only when I compiled and saved all.    Now, however, I
don't think I can do that anymore.  Also, it did not bring up the offending
module or offer to help me debug it.

The situation is getting worser and worser, as my 4 year-old might say.

Here are a list of solutions that I found on the newsgroups and tried.

1)    Tried adding "Option Explicit" to the beginning of all modules.
However, all of my variables were declared explicitly anyway.  I abandoned
that idea when it would not allow me to modify one of the modules.

2)    Thought I found the offending form, assumed it was corrupted, and
duplicated it.I then copied and pasted all objects and modules to the new
form.  That worked great. . .for five seconds.  Closed the database, opened
it back up and, voila, automation error.

3)    Changed the reference library from Microsoft DAO 2.5/3.51
Compatibility Library (dao2535.tlb) to Microsoft DAO 3.51 object library
(dao350.dll).  It wouldn't let me choose both.  Also chosen are Visual Basic
for Applications, utility, and Microsoft Office 8.0 object library.

When I tried to recompile using the new library selected, I received the
same error message.  When I tried to change it back to DAO 2.5/3.51, it
wouldn't let me.

I am at my wit's end.  Can anyone tell me anything about what is going on?
I've been doing Access a long time and I have not run into this before.>>



Thu, 27 Dec 2001 03:00:00 GMT  
 Automation Error
Thanks to all for your help.  I ended up, after researching everything,
taking the suggestion of creating a new database, importing all of the
tables, queries and reports, and then copying and pasting each individual
form (just in case something got passed through in the import procedure that
was causing the error).  That seems to have fixed it.  I still wish I knew
what caused it in the first place, but I have a clue.

I believe what caused my trouble is that I used the CreateObject method
without having the MS Word reference checked.  It still worked, since I did
not specifically name "Word.Application" in the variable.  But even when I
added that as a reference, it did not correct the error.

Anyway.  Thanks for your help.

Ed



Sat, 29 Dec 2001 03:00:00 GMT  
 
 [ 11 post ] 

 Relevant Pages 

1. Compile error: Automation error, Error 32811: Unexpected error

2. Automation Error during Remote Procedure Call (RPC) using DCOM and Automation Manager

3. Compilation error: Automation Error (Error 440)

4. Run-time error '-2147417846 (8001010a)': Automation error (error 440)

5. Run-time error '-2147417846 (8001010a)': Automation error (error 440)

6. Compilation error/Automation error

7. Compile error: Automation error

8. Automation error (Error 440)

9. Error: Automation Error and other problems

10. Compile Error : Automation Error

11. Automation error... Error 424, Object Required

12. Receive Error (404) Automation Error when creating new mailitem from MS Access

 

 
Powered by phpBB® Forum Software