Connecting Tech Pros Worldwide Forums | Help | Site Map

AutoExec RunCode "Action Failed"

Tom Chidwick
Guest
 
Posts: n/a
#1: Nov 13 '05
Hello,

I've custom-built a fairly extensive object model that is designed to
run in the background
and control the opening and closing of related forms. The whole thing
kicks-off with an
AutoExec macro at startup, using a RunCode action that calls a global
function and the
rest works great. Pretty good stuff - flies like an eagle, when it
works.

Here's were the ugliness starts. Sometimes it works great. Sometimes
it works great
but the macro throws an error, even though my code completes.
Sometimes my code
just breaks into debug mode for no reason. Sometimes the .mdb
crashes. Sometimes
the Access application blows-up (and I get to choose whether or not to
advise Microsoft -
love that part). There is no apparent reason or predictability to any
of it.

I've looked pretty closely at DB corruption and memory leaks. I've
tested the code for
weeks now. My code is pretty sound. Step-through ALWAYS works fine -
no errors.

Does anybody have any suggestions on the cause of the apparent macro
failure?

Thanks in advance for your ideas!

Sincerely,

Tom

Sherwood Wang
Guest
 
Posts: n/a
#2: Nov 13 '05

re: AutoExec RunCode "Action Failed"



"Tom Chidwick" <tchidwickjr@comcast.net> wrote in message
news:a5e956e5.0409182224.5cb94e85@posting.google.c om...[color=blue]
> Hello,
>
> I've custom-built a fairly extensive object model that is designed to
> run in the background
> and control the opening and closing of related forms. The whole thing
> kicks-off with an
> AutoExec macro at startup, using a RunCode action that calls a global
> function and the
> rest works great. Pretty good stuff - flies like an eagle, when it
> works.
>
> Here's were the ugliness starts. Sometimes it works great. Sometimes
> it works great
> but the macro throws an error, even though my code completes.
> Sometimes my code
> just breaks into debug mode for no reason. Sometimes the .mdb
> crashes. Sometimes
> the Access application blows-up (and I get to choose whether or not to
> advise Microsoft -
> love that part). There is no apparent reason or predictability to any
> of it.
>
> I've looked pretty closely at DB corruption and memory leaks. I've
> tested the code for
> weeks now. My code is pretty sound. Step-through ALWAYS works fine -
> no errors.
>
> Does anybody have any suggestions on the cause of the apparent macro
> failure?
>
> Thanks in advance for your ideas!
>
> Sincerely,
>
> Tom[/color]


is a flying fucked eagle if you ask for me. american joke yes?

you try now no marco please. load global function from startup form ok?

*Sherwood Wang MVP*




Steve Jorgensen
Guest
 
Posts: n/a
#3: Nov 13 '05

re: AutoExec RunCode "Action Failed"


Hi Tom,

It sounds like it could be VB Project corruption. First, try a decompile.

To decompile an Access project

1. Back up your MDB file.
2. Rename your AutoExec macro, so it won't run on startup.
3. Locate your copy of MSAccess.exe, and make a shortcut to it.
4. Edit the shourtcut, and add " /Decompile" to the end of the command line.
5. Drag your mdb file to the shortcut.
6. Repair and Compact the database.
7. Go to the code editor, compile the code, and save it.

This fixes VB project corruption about 85% of the time. For the other 15
percent of the time, you have to import all the objects into a new database
(not including code modules), then copy and paste the text from the old
project's code modules into the modules in the new project. To delete modules
from forms and reports (in a copy - not your original) before importing into
the new copy for repair, edit each form/report, and change the Has Module
property to "No".


On 18 Sep 2004 23:24:45 -0700, tchidwickjr@comcast.net (Tom Chidwick) wrote:
[color=blue]
>Hello,
>
>I've custom-built a fairly extensive object model that is designed to
>run in the background
>and control the opening and closing of related forms. The whole thing
>kicks-off with an
>AutoExec macro at startup, using a RunCode action that calls a global
>function and the
>rest works great. Pretty good stuff - flies like an eagle, when it
>works.
>
>Here's were the ugliness starts. Sometimes it works great. Sometimes
>it works great
>but the macro throws an error, even though my code completes.
>Sometimes my code
>just breaks into debug mode for no reason. Sometimes the .mdb
>crashes. Sometimes
>the Access application blows-up (and I get to choose whether or not to
>advise Microsoft -
>love that part). There is no apparent reason or predictability to any
>of it.
>
>I've looked pretty closely at DB corruption and memory leaks. I've
>tested the code for
>weeks now. My code is pretty sound. Step-through ALWAYS works fine -
>no errors.
>
>Does anybody have any suggestions on the cause of the apparent macro
>failure?
>
>Thanks in advance for your ideas!
>
>Sincerely,
>
>Tom[/color]

Thomas Chidwick
Guest
 
Posts: n/a
#4: Nov 13 '05

re: AutoExec RunCode "Action Failed"


Hi Steve!

I've tried all that, several times. I'll do it again though - we'll see
what happens. Thanks for the reply. Funny we should meet here!

Tom

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Thomas Chidwick
Guest
 
Posts: n/a
#5: Nov 13 '05

re: AutoExec RunCode "Action Failed"


Mr. Wang,

I'm not even going to tell you what I think of your comment. You don't
do anybody any help but saying such things.

A startup form is outside the design specifications for my project. The
AutoExec macro is the only macro I'm using, and should work properly.

Please do me a favor, and don't bother helping me anymore.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Steve Jorgensen
Guest
 
Posts: n/a
#6: Nov 13 '05

re: AutoExec RunCode "Action Failed"


There is a troll here who is impersonating Sherwood Wang, and being very
obnoxious. In fact, any post here this obnoxious is probably not from the
person it claims to be from.

On 19 Sep 2004 11:10:55 GMT, Thomas Chidwick <tchidwickjr@comcast.net> wrote:
[color=blue]
>Mr. Wang,
>
>I'm not even going to tell you what I think of your comment. You don't
>do anybody any help but saying such things.
>
>A startup form is outside the design specifications for my project. The
>AutoExec macro is the only macro I'm using, and should work properly.
>
>Please do me a favor, and don't bother helping me anymore.
>
>*** Sent via Developersdex http://www.developersdex.com ***
>Don't just participate in USENET...get rewarded for it![/color]

Steve Jorgensen
Guest
 
Posts: n/a
#7: Nov 13 '05

re: AutoExec RunCode "Action Failed"


On 19 Sep 2004 11:10:54 GMT, Thomas Chidwick <tchidwickjr@comcast.net> wrote:
[color=blue]
>Hi Steve!
>
>I've tried all that, several times. I'll do it again though - we'll see
>what happens. Thanks for the reply. Funny we should meet here!
>
>Tom
>
>*** Sent via Developersdex http://www.developersdex.com ***
>Don't just participate in USENET...get rewarded for it![/color]

Well, beyond that, it would be helpful if you can identify where it is in the
code when the crash occurs. One trick I've done to help with that is write to
a log file at random points in the code. Adter it crashes, check the log, and
add more log writes at point in the code after the last write, etc., until you
get down to the precise point of the problem.

It's a nasty thing to have to do, but when Access is crashing, I haven't sound
another way to track down where it's happening.

The last time it happened to me, and it wasn't corruption, it was because I
called a function from within a query that made a DAO call, and failed to
correctly close object references, and set them to Nothing.

Oh yeah, also make sure that any object you get a reference to by anything
other than directly creating or opening it, you only set to Nothing, and don't
Close. For instance, after you use CurrentDb to get a reference to a Database
instance, don't close that. Results can be unpredictable.
Sherwood Wang
Guest
 
Posts: n/a
#8: Nov 13 '05

re: AutoExec RunCode "Action Failed"



"Thomas Chidwick" <tchidwickjr@comcast.net> wrote in message
news:414d693e$1$26167$c397aba@news.newsgroups.ws.. .[color=blue]
> Mr. Wang,
>
> I'm not even going to tell you what I think of your comment. You don't
> do anybody any help but saying such things.
>
> A startup form is outside the design specifications for my project. The
> AutoExec macro is the only macro I'm using, and should work properly.
>
> Please do me a favor, and don't bother helping me anymore.[/color]



so sorry you not humorous today! but you have flying eagle problem not me
yes?

ok starup form is good design for pros. pros not use macro never. pros no
macro error always fatal 2. you not pro so get crash all time true? is
some eagle you write fake boy!

*Sherwood Wang MVP*




Closed Thread