Compilation error/Automation error
Author |
Message |
Ulri #1 / 23
|
 Compilation error/Automation error
Hello, Just yesterday Access was working fine, today none of the code I've been writing the past few days is working. When I start a form with code in the OnOpen or OnActivate event, a msgbox pops up. The following is written in the msgbox (freely translated): Compilation error Automation error Upon pressing the OK button, I'm brought to where the problem is, and it is always something with the acSomething (acGotoNew or what ever) Anyone got any idea what's up, and how I correct things? I think Access crashed at one point... I added some TimeZone conversion code yesterday which isn't there. One field (a date/time field) in my Ordertable is set to have the standardvalue of Date(), but this is not recogniced by Access, in a new redors #Name? is written in the field... Another database is working totally fine... Thanks a bunch Ulrik -------------------------------- "I'm not a vegetarian because I love animals. I'm a vegetarian because I hate plants." A. Whitney Brown
|
Mon, 12 Jan 2004 17:28:48 GMT |
|
 |
Ulri #2 / 23
|
 Compilation error/Automation error
I have now tried 'repaid database' and 'kompress database' (just to try something), and that hasn't solved my problems. Furthermore I have noticed that apparently ALL events (including Access' own OnClick events) are not working because of the automation error. Also I cannot edit the modules or class modules, as well as saving a module is impossible (I deleted my latest function to see if that was the trouble maker, it wasn't) How do I bring flowers and chocolate to the database and say I'm sorry for what ever I've done? Thanks Ulrik
Quote: > Hello, > Just yesterday Access was working fine, today none of the code I've been > writing the past few days is working. When I start a form with code in the > OnOpen or OnActivate event, a msgbox pops up. The following is written in > the msgbox (freely translated): > Compilation error > Automation error > Upon pressing the OK button, I'm brought to where the problem is, and it is > always something with the acSomething (acGotoNew or what ever) > Anyone got any idea what's up, and how I correct things? > I think Access crashed at one point... I added some TimeZone conversion code > yesterday which isn't there. One field (a date/time field) in my Ordertable > is set to have the standardvalue of Date(), but this is not recogniced by > Access, in a new redors #Name? is written in the field... > Another database is working totally fine... > Thanks a bunch > Ulrik > -------------------------------- > "I'm not a vegetarian because I love animals. I'm a vegetarian because I > hate plants." > A. Whitney Brown
|
Mon, 12 Jan 2004 18:13:27 GMT |
|
 |
Turtl #3 / 23
|
 Compilation error/Automation error
Have you checked your references? From any code module, select Tools - References. If any item is marked MISSING, remove the check. Click OK to close the box and accept the changes. If you really needed that reference, open it again and check the reference you need. HTH - Turtle
Quote: > Hello, > Just yesterday Access was working fine, today none of the code I've been > writing the past few days is working. When I start a form with code in the > OnOpen or OnActivate event, a msgbox pops up. The following is written in > the msgbox (freely translated): > Compilation error > Automation error > Upon pressing the OK button, I'm brought to where the problem is, and it is > always something with the acSomething (acGotoNew or what ever) > Anyone got any idea what's up, and how I correct things? > I think Access crashed at one point... I added some TimeZone conversion code > yesterday which isn't there. One field (a date/time field) in my Ordertable > is set to have the standardvalue of Date(), but this is not recogniced by > Access, in a new redors #Name? is written in the field... > Another database is working totally fine... > Thanks a bunch > Ulrik > -------------------------------- > "I'm not a vegetarian because I love animals. I'm a vegetarian because I > hate plants." > A. Whitney Brown
|
Mon, 12 Jan 2004 19:22:17 GMT |
|
 |
David Carne #4 / 23
|
 Compilation error/Automation error
Turtle's suggestion was my first thought; but I would also look at the 'Events' tab in the Properties of the controls that have events. Make sure that the Click event (or whatever) still have [Event Procedure] on the appropriate line. I've had Access just drop that out, which means events don't happen, even though the code is still there. Welcome to the Wonderful World of Access Squirreliness. Ciao, Dave
|
Mon, 12 Jan 2004 21:18:35 GMT |
|
 |
Todd Pasters #5 / 23
|
 Compilation error/Automation error
It happened to me many times, sorry, never found a resolution. The problem appeared to have been fixed, without publication, with SP2. Quote:
> I have now tried 'repaid database' and 'kompress database' (just to try > something), and that hasn't solved my problems. Furthermore I have noticed > that apparently ALL events (including Access' own OnClick events) are not > working because of the automation error. Also I cannot edit the modules or > class modules, as well as saving a module is impossible (I deleted my latest > function to see if that was the trouble maker, it wasn't) > How do I bring flowers and chocolate to the database and say I'm sorry for > what ever I've done? > Thanks > Ulrik
> > Hello, > > Just yesterday Access was working fine, today none of the code I've been > > writing the past few days is working. When I start a form with code in the > > OnOpen or OnActivate event, a msgbox pops up. The following is written in > > the msgbox (freely translated): > > Compilation error > > Automation error > > Upon pressing the OK button, I'm brought to where the problem is, and it > is > > always something with the acSomething (acGotoNew or what ever) > > Anyone got any idea what's up, and how I correct things? > > I think Access crashed at one point... I added some TimeZone conversion > code > > yesterday which isn't there. One field (a date/time field) in my > Ordertable > > is set to have the standardvalue of Date(), but this is not recogniced by > > Access, in a new redors #Name? is written in the field... > > Another database is working totally fine... > > Thanks a bunch > > Ulrik > > -------------------------------- > > "I'm not a vegetarian because I love animals. I'm a vegetarian because I > > hate plants." > > A. Whitney Brown
|
Mon, 12 Jan 2004 21:22:07 GMT |
|
 |
Ulri #6 / 23
|
 Compilation error/Automation error
Hello, and thanks for the help. The following references are checked in the same order: Visual Basic For Applications Microsoft Access 8.0 Object Library Microsoft DAO 3.5 Object Liberary Microsoft Internet Controls Noone is marked MISSING. All neccesary events still have their event procedure, it's compiling these events thats the problem. Also I cannot play any function at all, and access dosen'r recognice it's own functions, as Date(), Now(), Iif() and so forth. Also I cannot save classmodules or modules... I keep returning to an error with compiling the modules and classmodules (when does that happen by the way?), but I cannot believe that I've been able to create code or something like that to totally mess up the compilation of this single database... as I've said; other databases work very fine... I've got no idea what to do, 'cept start copying to a new database. I just thought that I was in control of the machine, and not the other way around... :-) Todd: what is SP2? Thanks Ulrik
Quote: > Turtle's suggestion was my first thought; but I would also look at the > 'Events' tab in the Properties of the controls that have events. Make sure > that the Click event (or whatever) still have [Event Procedure] on the > appropriate line. I've had Access just drop that out, which means events > don't happen, even though the code is still there. > Welcome to the Wonderful World of Access Squirreliness. > Ciao, > Dave
|
Tue, 13 Jan 2004 00:10:16 GMT |
|
 |
Keith Fink ( #7 / 23
|
 Compilation error/Automation error
<< <<I have now tried 'repaid database' and 'kompress database' (just to try <<something), and that hasn't solved my problems. Furthermore I have noticed <<that apparently ALL events (including Access' own OnClick events) are not <<working because of the automation error. Also I cannot edit the modules or <<class modules, as well as saving a module is impossible (I deleted my latest <<function to see if that was the trouble maker, it wasn't) << <<How do I bring flowers and chocolate to the database and say I'm sorry for <<what ever I've done? << It sounds like the VBA project is corrupt, or at least in some sort of unexpected state. Try doing this: 1. Make a backup if you don't have one. 2. Open the database using the /Decompile switch from a command line. This will cause Access to throw away the binary storage of the VBA project, and recreate it. Lots of times this will fix weirdness such as this. Do NOT do this until you do step 1. :-) "C:\Program File\Microsoft Office\Office\msaccess.exe" "C:\My Documents\Db1.mdb" /Decompile Hope this helps! Sincerely, Keith Fink Microsoft Developer Support
|
Tue, 13 Jan 2004 02:14:13 GMT |
|
 |
Ken Rea #8 / 23
|
 Compilation error/Automation error
Ulrik If Date(), Now(), Iif() are not working you almost certainly have a missing reference to a library. Regards Ken Reay
Quote: > Hello, and thanks for the help. > The following references are checked in the same order: > Visual Basic For Applications > Microsoft Access 8.0 Object Library > Microsoft DAO 3.5 Object Liberary > Microsoft Internet Controls > Noone is marked MISSING. > All neccesary events still have their event procedure, it's compiling these > events thats the problem. Also I cannot play any function at all, and access > dosen'r recognice it's own functions, as Date(), Now(), Iif() and so forth. > Also I cannot save classmodules or modules... > I keep returning to an error with compiling the modules and classmodules > (when does that happen by the way?), but I cannot believe that I've been > able to create code or something like that to totally mess up the > compilation of this single database... as I've said; other databases work > very fine... > I've got no idea what to do, 'cept start copying to a new database. I just > thought that I was in control of the machine, and not the other way > around... :-) > Todd: what is SP2? > Thanks > Ulrik
> > Turtle's suggestion was my first thought; but I would also look at the > > 'Events' tab in the Properties of the controls that have events. Make > sure > > that the Click event (or whatever) still have [Event Procedure] on the > > appropriate line. I've had Access just drop that out, which means events > > don't happen, even though the code is still there. > > Welcome to the Wonderful World of Access Squirreliness. > > Ciao, > > Dave
|
Tue, 13 Jan 2004 03:02:34 GMT |
|
 |
Van T. Din #9 / 23
|
 Compilation error/Automation error
Sometimes, none of the References is marked as "MISSING" but they are still messed up. I am almost certain this is the case. The attached instruction from Douglas J. Steele hopefully will help you to fix up the problem. ***Quote*** Open any code module (or open the Immediate Window, using Ctrl-G, provided you haven't selected the "keep debug window on top" option). Select Tools | References from the menu bar. Examine all of the selected references. If any of the selected references have "MISSING:" in front of them, unselect them, and back out of the dialog. If you really need the reference(s) you just unselected (you can tell by doing a Compile All Modules), go back in and reselect them. If none have "MISSING:", select an additional reference at random, back out of the dialog, then go back in and unselect the reference you just added. If that doesn't solve the problem, try to unselect as many of the selected references as you can (Access may not let you unselect them all), back out of the dialog, then go back in and reselect the references you just unselected. (NOTE: write down what the references are before you delete them, because they'll be in a different order when you go back in). Just so you know: the problem will occur even if the library that contains the specific function that's failing doesn't have a problem. ***Unquote*** HTH Van T. Dinh
Quote: > Hello, and thanks for the help. > The following references are checked in the same order: > Visual Basic For Applications > Microsoft Access 8.0 Object Library > Microsoft DAO 3.5 Object Liberary > Microsoft Internet Controls > Noone is marked MISSING. > All neccesary events still have their event procedure, it's compiling these > events thats the problem. Also I cannot play any function at all, and access > dosen'r recognice it's own functions, as Date(), Now(), Iif() and so forth. > Also I cannot save classmodules or modules... > I keep returning to an error with compiling the modules and classmodules > (when does that happen by the way?), but I cannot believe that I've been > able to create code or something like that to totally mess up the > compilation of this single database... as I've said; other databases work > very fine... > I've got no idea what to do, 'cept start copying to a new database. I just > thought that I was in control of the machine, and not the other way > around... :-) > Todd: what is SP2? > Thanks > Ulrik
<snipped the rest>
|
Tue, 13 Jan 2004 08:49:05 GMT |
|
|
Page 1 of 2
|
[ 23 post ] |
|
Go to page:
[1]
[2] |
|