473,320 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Schedule Access Macro to Run Weekly

9
I have created a macro in Access 2010 that pulls equipment due for inspection in the next 14 days and emails the report to two of our employees. I'd like to either: 1. Make this macro auto run every Monday at 9 am or, 2. Make it auto run when there is equipment due in 14 days (and not email if there are none due in 14 days). The DB will be open because I have very little desire to fool with Windows Task Scheduler at this point. I could be persuaded if that is a better option and easy to set up (I have 0 experience with writing scripts in Task Scheduler).

Thanks,
Me
Mar 7 '16 #1
3 1554
NeoPa
32,556 Expert Mod 16PB
rd3Po:
The DB will be open because I have very little desire to fool with Windows Task Scheduler at this point.
That seems a very strange comment. Certainly makes little sense to me. What would cause it to open if not the scheduler?

If you're interested, I did an article a while ago that helps you handle such stuff - Invoking a Database From the Command Line.
Mar 8 '16 #2
rd3Po
9
NeoPa... Thanks for your reply. If the DB is open already (it would be open throughout the day every weekday) then there's no reason that I can think of to run a Task Scheduler script. I will review your article and determine if it's an option I want to proceed with.
Mar 8 '16 #3
NeoPa
32,556 Expert Mod 16PB
In that case you'd want a Timer routine to be triggered every specified duration and it should check the date and time every time it's triggered and run once it's reached the appropriate time.

To ensure it doesn't run twice for the same time you should save the value of when it actually runs the process. This should be used to compare with the current time to ensure it's not just run it seconds before.

How you set the .TimerInterval is down to you.
Mar 9 '16 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jason L. | last post by:
Here's the scenario. Using a campaigning applicaion for an eNewsletter. It writes to an Access table. I have an ASP web page that writes to another table. I chained 3 Access queries together into...
0
by: Alex | last post by:
i have a module in Access which opens an existing Excel file and envokes a macro within the Excel file to draw graphs. now i am trying to convert the Excel macro to an Access one so that the...
0
by: Evgeny | last post by:
I'm trying to run an Access Macro from .NET. My code right now looks like this: Access.ApplicationClass oAccess = new Access.ApplicationClass(); oAccess.Visible = true; string path =...
1
by: Sen K via .NET 247 | last post by:
(Type your message here) Hi, Any help is appreciated. I have a situation wherein i need to compact access db after somebusiness logic through VB.NET.I've written a function in VBA tocompact...
8
by: Shooter4Life8 | last post by:
I am trying to run a macro from my VB.NET program. Here is my code. Dim myAccess As Access.Application Dim allMacro As String = "ALL-Macros" myAccess.DoCmd.RunMacro(allMacro) I get the error....
1
by: jbird27 | last post by:
I am an extreme newbie on VB, so I apologize if this seems so simple. I am trying to run a module from an Excel spreadsheet that will open and run an Access macro. I have been able to open the...
1
by: yello | last post by:
Hi All, I have a MS Access macro which needs to be scheduled in the Task Scheduler. I am using the following link to schedule the macro "C:\Program Files\Microsoft...
5
by: rajatsingh78 | last post by:
I have created a SQL Server Database on one machine on my network, on another machine on the same network I have linked the database using MS Access. I have now created a macro to extract the...
5
by: redman08 | last post by:
Is there a way of producing a printout of an Access macro (or all macros in the database) using VBA, ideally one line per command for documentation purposes? Many thanks for any help.
1
by: zwheeler | last post by:
I am trying to run an access macro from an excel application. i found the following code and tried to implement it but i keep getting a error 2046: i go to references and set the references to :...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.