By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,197 Members | 1,210 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,197 IT Pros & Developers. It's quick & easy.

AutoExec RunCode "Action Failed"

P: n/a
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
Nov 13 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a

"Tom Chidwick" <tc*********@comcast.net> wrote in message
news:a5**************************@posting.google.c om...
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

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*


Nov 13 '05 #2

P: n/a
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, tc*********@comcast.net (Tom Chidwick) wrote:
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


Nov 13 '05 #3

P: n/a
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!
Nov 13 '05 #4

P: n/a
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!
Nov 13 '05 #5

P: n/a
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 <tc*********@comcast.net> wrote:
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!


Nov 13 '05 #6

P: n/a
On 19 Sep 2004 11:10:54 GMT, Thomas Chidwick <tc*********@comcast.net> wrote:
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!


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.
Nov 13 '05 #7

P: n/a

"Thomas Chidwick" <tc*********@comcast.net> wrote in message
news:41**********************@news.newsgroups.ws.. .
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.


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*


Nov 13 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.