Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access and Window's Scheduled Task issue 1

Status
Not open for further replies.

jsteph

Technical User
Oct 24, 2002
2,562
US
Hi all,
We run a lot of Access app via Window's Scheduled Tasks functionality. This is Win 2003 server SP2, with Access 2003 SP3.

I have two related issues. First, often Access starts and it immediately goes to a debug window with the yellow line on a totally random line that has never in it's life had a breakpoint, as far as I know. I've read (and it appears to work) that using the /decompile option makes this go away.

First question, does anyone know what *causes* that and how to avoid it?

Second, when this happens when Access runs on a Scheduled Task, I may not know it because the task runs on a separate login than how I log onto the server.

I run a particular report that's emailed via this access app every hour on the hour. So what's happening is when my task timeout comes up, (I usuall set it to 15 min) access is aborted by Task Scheduler, and then the next time it runs, a message comes up (again, I dont' see this because it's in a separate login) saying something like "The last time Access was opened something bad happened, would you like to repair it?".

So this is compounding the issue--once that debug thing happens once, that report will never run for that entire day because now the timeout kills it because it's waiting for a dialog click.

So Second question is--is there an option to supress dialogs and let access *try* to open and hope the debug stop doesn't happen the next time? This is at a higher level than the docmd.setwarnings--it's as the app is opening.


Thanks for any help. I guess a third question would be, is there a third-party scheduler that really works and has more security and flexibility? The Windows version is very cumbersome and has odd security--changing some items require the whole password thing--yet *any* user can open any task and *disable* a critical task with no password prompt. I don't understand that.
Thanks,
--Jim
 
Remou,
Thanks for that link, it seems to give the cause, which I think is likely correct--altering code while in break mode. It doesn't do this all the time, i.e. I can't consistently reproduce this, but that still sounds like a reasonable cause.

The other issue caused by altering code in break mode is that it doesn't always Save the code, even when you hit Save. I can't tell how many times I'd made changes, hit Save, then when I reopened my old code was there.

As for the log message, I use a Chilkat smtp email .dll to email me when jobs are complete. The problem with that is that I have so many other jobs running and I get so many 'confirmation' emails that it becomes self-defeating--I tend to filter them out mentally so if one, even a few, are missing I might not notice it.
--Jim
 
A log file would be easier to examine, I think. A query should be sufficient to point up gaps.
 
Hi Jim,

What you describe is the code is in 'Break' mode

You need to open a code window,
Then Click on DEBUG> Clear All BreakPoints (Do this clear twice)
Finally, Click DEBUG > Compile.

This should solve the Stop in Break Mode.

You can also Create a compiled MDE that will not 'Break'

Click Tools>Database Utilities > Make MDE
Now run the MDE instead of the MDB

Regarding the second problem, if the Access program is getting corrupt, then you could write a script or batch file that first copies a 'Good' version of your program to a temp file.
Then Run the temp file instead of the good version.
That way, you are always starting with a good copy of the Access mdb or mde

Now have task scheduler run the script

Hope this Helps,
Hap...


Access Developer [pc] Access based Accounting Solutions - with free source code
Access Consultants forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top