scheduling

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to schedule a macro to run every day without being dependant
on the Windows Scheduled Tasks? The database is going to sit on a shared
drive and I would not like for the macro to be dependant on my PC being
powered on or not.
 
Hi Mark,

You may want to look into using Total Access Agent by FMS. Of course, it
would have to be running on some PC that was always powered up, but this
product is designed to run as a Windows NT Service. This means that it can be
run without a user needing to be logged on.

http://www.fmsinc.com/products/Agent/index.html


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
Thanks Tom! I forwarded the link to my manager. We'll see what he says. In
the meantime though, I have got a PC that is supposed to run a scheduled
task. That scheduled task is a VBS script that runs the Access macro.
However, the last couple days, it has not worked and the status just says:
"Could not start". Here's the code for the script. Let me know if I need to
jump to the scripting Newsgroup:

Option Explicit

Dim objAccess
Dim strPath
Dim strMacro
Dim strFileName
'Dim WshNetwork, PrinterPath, PrinterDriver

strPath = "L:\Medical\OoQ\Apps\ASU\ASULogApp.mdb"
strMacro = "macImportASULoad_Mark"
strFileName = "L:\MEDICAL\OOQ\SOLUTIONSWORLD\DELIVER\ASUDLOAD.TXT"
Set objAccess = CreateObject("Access.Application")
objAccess.OpenCurrentDatabase(strPath)
objAccess.DoCmd.RunMacro strMacro
objAccess.CloseCurrentDatabase
objAccess.Quit
Set objAccess = Nothing
Set objFS = CreateObject("Scripting.FileSystemObject")
Set objTS = objFS.OpenTextFile(strFileName, 2)
 
Hi Mark,

Have you verified that the path indicated,
"L:\Medical\OoQ\Apps\ASU\ASULogApp.mdb" is a valid path? If it is, then you
should be able to click on Start > Find | Files or Folders, paste in this
path, and the search should be successful. You might try substituing the UNC
(Uniform Naming Convention) path in place of using the mapped drive letter
"L". That way, the path would look something like this:

\\Server\Share\Medical\OoQ\Apps\ASU\ASULogApp.mdb

The same considerations apply to your ASUDLOAD.TXT file.

I just tested your script, and it works fine on my PC, except that it looks
like you need to declare objFS and objTS.

You didn't mention which version of Access that you are using, but if you
are using Access 2003, you might want to verify that you have macro security
set to Low. (If not, then you may need to add code to your VB script file to
set the macro security to low).


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
Thanks Tom,
Yeah the script works on my PC and it did work for a few days on the other
PC, then one day, bam, "Could not start". My company uses Webfocus as the
main application to do reporting, etc.,. WF has a scheduling application
that will only schedule WF programs. So, I'm trying to kick off the script
from a WF program so that I can schedule it. But that doesn't seem to be
working for me either. So, I'm kind of in a rut right now.

I will try your suggestions. Thanks again for the help!
 
Back
Top