Program Windows Scheduled Task

Aug 23, 2007

Hi All,

Does anyone one if it is possible to program a schedule for "Windows Scheduled Task" via VBA?

Reason:- A multi user application is set to give a 5 Min warning at the same time every day. After the 5min the users are politely kicked off.

At that time the Windows Scheduled task opens up the BE (only on 1 PC the fastest). The BE start form has a time event that backs up the BE and compacts and repairs itself then closes the application.

Not pretty I know but it works really well.

This shutdown time can be set/changed on the FE however, when it is the windows Scheduled Task has to also be changed which I would like to do automatically via VBA

Any help would be appreciated.

View Replies


ADVERTISEMENT

Modules & VBA :: Scheduled Task On Windows Server

Apr 20, 2015

I have a vbs-script that opens my access database db.mdb and runs the module "Export":

dim accessApp
set accessApp = createObject("Access.Application")
accessApp.OpenCurrentDataBase("D:Datadb.mdb")
accessApp.Run "Export"

accessApp.Quit
set accessApp = nothing

This works fine as a scheduled task on a Windows 7 computer.

Is there a way to make this work on a Windows Server 2008 R2 ? When I double click the vbs-file, the file opens instead of runs. And when I create a scheduled task, nothings happens.

View 2 Replies View Related

Running A Query / Macro Through Scheduled Task?

Aug 25, 2012

I have a MS Access append query that updates a table from a linked Excel spreadsheet. Im trying to automate the running of the query during the night.

Ive tried a couple of ways to schedule the task with Windows Task Scheduler, although each time, it appears to start the job, but then just hang (task never completes, doesnt run the query or macro and when I log back into Windows, the msaccess.exe process is running).

Methods Ive used are:

- command line with /x macroname

- vbs script which runs the query / macro

Code:
'Read from a Microsoft ACCESS database
Option Explicit
dim oaccess
'execute another Access macro
set oaccess = createobject("access.application")
oaccess.opencurrentdatabase "H:Database.mdb"
oaccess.docmd.setwarnings false
oaccess.DoCmd.RunMacro "Macro1"
oaccess.docmd.setwarnings true
oaccess.closecurrentdatabase
oaccess.quit
set oaccess=nothing
WScript.Quit(0)

- .bat file which just has the command line in it.They all run fine when I am logged in, although it seems to hang when I am logged off the network. I have the correct permissions as Ive scheduled a Excel macro to run and its fine.

View 4 Replies View Related

General :: Scheduled Task To Import Daily CSV Exports?

May 18, 2015

We have small data dumps from a webservice delivered to us daily in csv format. I'd like to create a system where we can have the data automatically imported into either Access.

My idea is this:

1. CSV is downloaded to <x> folder.

2. Scheduled Task runs script to look in folder <x>

3. If CSV is found in folder <x>, import it's data into a fixed Access db->table.

4. Move CSV to an archive folder to avoid re-processing.

Is this feasible? How complicated would it be, and how to get it on track?

View 1 Replies View Related

Modules & VBA :: Scheduled Task - Run Macro To Send Report Out?

Feb 3, 2014

I have a report that I run manually from my computer every day.

This report is created by a macro in microsoft access, then it runs a VBA macro to send it out..

Is there a way that I can add this as a scheduled task since I usually forget to send it out?

View 3 Replies View Related

Modules & VBA :: How To Force Windows Task Bar To Always Be On Top

Apr 14, 2014

I write Access 2010 apps in VBA that require no knowledge of Microsoft Access on the part of the user. My forms contain all the necessary controls to use the program without relying on any of the Microsoft Access toolbars. I call this "de-Microsofting" the app. When I prepare the .accdb program to create a .accde app, I uncheck every checkbox (Options/Current Database) except "Compact on Close". This works well, but it also hides the Windows taskbar at the bottom of the screen. Some of my users need to be able to jump from my app to others (e.g., Excel) and back without having to exit my app. How can I force the Windows taxkbar to always be on top using VBA or, possibly, some setting?

View 4 Replies View Related

How To Show The Database Objects In The Windows Task Bar

Sep 11, 2007

I have a problem. This problem is that I cant see the Database objects (Forms,Report,...) in the Windows task bar. I want the user to be able to see any opened form, or report directly in the task bar as any file opened by the Windows user.

I have tried to check on the (Show Windows in TaskBar) option available in the Tools -> options of the MS Access, but it doesn work with me.

What is happening now that I am forced to show the Menu Bar and use the Window menu to switch between the objects, however, This will not be OK for me because my system hides all the command bars the MS Acccess use.

Is the any way to solve this hard problem?

View 1 Replies View Related

How To Hide Form From Windows Task Panel?

Nov 7, 2006

Hi guys,

I have moved all my small databases into 1 larger database to save up on Taskbar space, but the problem is that when I use an opening form to open other forms (switchboard style) the additional forms show in the Task bar.

Is there some sort of macro that I can use to tell each form to suppress itself from the Task bar?

View 1 Replies View Related

Windows Task Scheduler, Access Is Left Running

Jan 25, 2008

Hi,
WHen I used Windows task scheduler to start my application, and then close the application normally, the application closes but Access is left running, still visible in the task bar. The only way I can get it to close is by using task manager to kill it. I found an old KB article ( # 246953) that hints that this (or something like it) is a known bug in Access 2000 but supposedly was resolved by an Office 2000 service pack 2. But I am already running Windows XP, SP2. Anyone else having this problem? Any workarounds?

View 1 Replies View Related

Works On Windows 2000 Not Windows 2003

Sep 19, 2006

I have a website that is asp (not .net) based with an Access DB and I am in the process of replacing an old windows 2000 server with a much faster windows 2003 server. Here lies the problem I have a script as part of the admin that exports data to a csv file. The query joins 4 tables together to get the data needed for the export. On the windows 2000 server it takes 1-5 seconds to execute and have the csv file ready for download. On the window 2003 server it times out. I striped it down to use 2 joins and it worked although it took more like 10-20 seconds to export. This exports a specific range of ID's and the range is normally only 40-50 rows. If I put time stamps in the code the problem is in the query of the database, so I know its not in the file write etc.

I am going to rewrite it to use multible querys instead of one large query, but I have many other sites that I am moving to this server that would work better if I can figure out why it is so slow.

The windows 2000 is a 900 mhz server the windows 2003 is a 2.8GHZ server both have 1 GIG of ram. The database file is on the local drive on both servers. I am guessing it is a difference in the Jet version, I just haven't been able to find a solution to the problem. This uses a DSN connection, configured the same on both servers. I have also tried it as a DSN-less connection with the same result.

I have installed access on the server and to execute the command in access it is <2 sec.

I am not an access expert I normally program in .net and php and use MySQL and MsSQL for databases, we just have these legacy sites that use Access DB's

View 1 Replies View Related

Access And Windows 98 To Windows 2000

Nov 27, 2006

Hi All,

This is my problem -

My customer has Access programs that work on their Windows 98 OS PC's, but when they try to use them on Windows 2000 OS PC's they will not work.
The programs I believe were originally written in Access 97 and now they have Access 2000 on the PC's.

By not working I mean the following -

The Access program allows them to enter a document name and then the file opens in Word - BUT - when they use it in Windows 2000 it does not open the document at all. It says file not found in Windows 2000 and the file does exist.

** The reason they have Access opening files is that Access keeps track of them for auditing purposes.

Now here is something that I want to mention. On PC's that were upgraded from Windows 98 to Windows 2000 the programs work.

Can anyone here tell me what is missing from 98 to 2000 that would do this.

Thank you very much for your time.

View 3 Replies View Related

Scheduled Shutdown Of Dbase

Jan 24, 2007

Hi,

I've searched the forum for a sample code on how to automatically shutdown database at a given time of the day, but i can't find any. There are lots of codes pertaining to inactivity / idle users but none on scheduled time.

My idea is to kick-off all users every 12:00nn, Monday to Saturday and then compact / backup database after.

I hope someone could assist me.

Thank you!


Sheila

View 1 Replies View Related

Queries :: Find Records Not Scheduled / Complete

Jun 4, 2013

I have a database for training. I have a table of employees with one of the criteria being active which is enabled by a check box. I have a second table of all of the training data. When I add a new employee, or I want to schedule someone, I want to be able to have a combobox on a form which I can select the type of training and then with a push of a button find if there is an active employee which has not had this training through results of a query.

View 14 Replies View Related

Modules & VBA :: Launch Access From Scheduled Tasks Without Interactive Login?

Sep 5, 2013

I have been searching the web for a solution to this problem. I have created a scheduled task on Windows 7 to automatically run a macro from a command line, however, it seems to only run when the user is logged onto the machine. Is there a way to run Access without the interactive logon? I would rather not leave the machine logged in with this account, but if that is the only solution, so be it.

View 7 Replies View Related

Modules & VBA :: Calendar Form - Allow Multiple Appointments Scheduled For Same Time

Mar 4, 2015

I am making a calendar form in Access and want it to look like Google Calendar as much as possible. I am wondering if there is a good way to go about setting up the form to allow for multiple appointments scheduled for the same time. Designing the form to be in Week View with half hour blocks has me at 210 text boxes. As far as I can tell, there isn't a way to dynamically add in controls unless you are in design view. However, how many appointments might be scheduled at the same time. I could add in as many text boxes as possible I guess, but that doesn't seem to be very efficient (and the base form is already at 210). Is there anyway to add in controls (such as text box or label) if a new appointment is added at the same time as existing ones?

View 5 Replies View Related

Vista 3d Windows To Windows Xp

Oct 20, 2006

Does anyone know if there is some type of theme to make windows xp windows 3d like vista's windows. example below.

http://www.winvistabeta.com/files%2Fscreens%2F5365%2Fexplorer%2Fwindows-vista-3d-switch-screen.jpg

View 2 Replies View Related

Help Task Pane???

Jul 6, 2005

Hi, im creating a new database system and want to give them a help facility in the form of a help task pane. Where they can access help from the table of contents, click on the item they want and the relevant help will appear.

Does anyone know how i can build this from scratch? :confused:

View 4 Replies View Related

An Even Harder Task

Nov 10, 2005

How would I combine all these instances under one After Update Click:


Private Sub lstAgreementType_AfterUpdate()

If Me.lstAgreementType.Value = "BN" Or Me.lstAgreementType.Value = "BA" Or Me.lstAgreementType.Value = "BT" Then
Me.txtSenateAandCDate.Enabled = False
Else
Me.txtSenateAandCDate.Enabled = True
End If

Private Sub lstAgreementType_AfterUpdate()

If Me.lstAgreementType.Value = "BN" Or Me.lstAgreementType.Value = "BA" Or Me.lstAgreementType.Value = "BT" Then
Me.txtSentateTreatyDoc.Enabled = False
Else
Me.txtSentateTreatyDoc.Enabled = True
End If

Private Sub lstAgreementType_AfterUpdate()

If Me.lstAgreementType.Value = "BN" Or Me.lstAgreementType.Value = "MN" Then
Me.txtRatsExchanged Date.Enabled = False
Else
Me. txtRatsExchanged Date.Enabled = True
End If

Private Sub lstAgreementType_AfterUpdate()

If Me.lstAgreementType.Value = "BN" Or Me.lstAgreementType.Value = "BA" Or Me.lstAgreementType.Value = "BT" Or Me.lstAgreementType.Value = "MN" Then
Me.lstDepositary.Enabled = False
Else
Me.lstDepositary.Enabled = True
End If

View 2 Replies View Related

Schedule A Task In Access

Oct 25, 2006

Hi i would like to know if it is possible to schedule a a task in access, at the moment i refresh all my excel report by using a button on a form in access and would like ot know if i can do this automatically

View 7 Replies View Related

Task Manager Problems

May 2, 2007

There are a few procedures that run when my Access database closes (backing up data, etc.). Since this can take a minute or two to finish (running over a network), one of the users here has started to use Task Manager to shut down the application.

This is not ideal, as the same user has also deleted the backend on more than one occasion. Should both happen on one day, we'd lose that day's updates.

Asking them not to do it doesn't work. Explaining why doesn't work. Telling them not to do it doesn't work. If I ask their supervisor to tell them not to do it, they just deny it. It's starting to look like the backup scripts aren't running, when they work fine for everyone else.

Is there any way of either
(a) Preventing them from doing this (unlikely, I'd have thought)
or
(b) Recording the fact that this has happened.

It doesn't necessarily have to be recorded in Access itself - although that would be ideal - if there's some other file I can access to get the info?

Any suggestions are gratefully received.

View 9 Replies View Related

How To Approach This Task Any Ideas More Than Welcome Thanks

Jul 30, 2007

Hi, ive been asked to provide a solution, for an electronic spreadsheet be sent out via email then returned by customers, once filled in for all the data to be collected onto one sheet that looks like the attached sheet. the easiset way i can see is to not use a spreadsheet but to use a datbase instead and just put it in the desired format, how easy is it to import mutliple spreasheets into correct fields on a dbtable thanks for any input or ideas

Al

View 3 Replies View Related

How To Always Keep Task Pane Open

Sep 26, 2005

Is there a way to always keep the task pane open? Right now when I open a file from the list on the task pane displayed under OPEN, the task pane disappears when the file opens. Then when I open the task pane again by clicking on the little white sheet of paper icon at upper left for "new", the task pane opens but the recent list of files used has collapsed and I have to click on the little house at top right to display the list of recently used files again so I can open one of them. Is there a way to keep both the task pane and the list of recently used files open at all times? Thanks.

View 5 Replies View Related

Calendar Based On Task

Dec 14, 2005

As a continuation from this thread (http://www.access-programmers.co.uk/forums/showthread.php?t=98369)...

Currently, I have a list of programs, each program could be considered the "task". When the task is completed, I want the user to click the date on the calendar and have it grayed out. As I mentioned before I have this working correctly, but I have the calendar pulling up based on a query that relys on the program ID. No problem, that way each program has it's own calendar. Now I need to be able to have it pull up the current month if one exists, and if it does not exist create it. For instance it works fine now, but once we hit 1/1/06, it will still be the same calendar... I want it to create a new record, so I could theoretically look at the old calendar if need be.

I tried to tie my query to a month field as well, but to no avail.

Thanks for your help!

View 14 Replies View Related

Help Accessing Task Manager

Aug 18, 2004

this has been "bugging" me for a while. everytime i access task
manager it opens for couple of seconds and then disappears. i heard
that this was some type of virus and/or spyware related. norton, spyware,
and adaware haven't seemed to solve this problem. please help

View 2 Replies View Related

Can We Supress Forms From The Task Panel?

Nov 7, 2006

Hi guys,

I have moved all my small databases into 1 larger database to save up on Taskbar space, but the problem is that when I use an opening form to open other forms (switchboard style) the additional forms show in the Start menu Task bar.

Is there some sort of macro that I can use to tell each form to suppress itself from the Task bar?

View 1 Replies View Related

General :: Task Scheduler To Run Macro?

Mar 19, 2014

Just got a new Windows 7 computer and installed Office 2013. I have a report that saves itself as a pdf in a temp folder and then attaches the pdf to an email and sends it out. I use a macro to run the report and everything works fine from there. I have a VBS file that runs the macro and clicking the vbs file makes everything work fine. the code is below.

When I tried to run it though the task scheduler it show as completing fine, but it doesn't. So I added a reference the vbs in a batch file (below) and output the logs to a temp file. After I ran the batch and opened the log I seen the message

Wed 03/19/2014 14:11:17.74 Username
C:Users*****DesktopAuto Reportsaragingrecent.vbs(1, 1) Microsoft VBScript runtime error: Permission denied: 'CreateObject'
Wed 03/19/2014 14:11:17.77

I turned UAC all the way down. turn off the virus scanner, and have local and domain admin access. I'm at bit a lose here. I had this working before but can't seem to remember how I did it. This is just one example I have several other reports that were schedule to run overnight, but they basically all use the same code and processes.

Code:
'launch macro
set accessApp = CreateObject("Access.Application")
accessApp.OpenCurrentDatabase "C:Users******DesktopAuto ReportsAgedTrialBalance.mdb"
accessApp.DoCmd.RunMacro "MCRecent"

[Code] ....

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved