?
Solved

Application.OnTime in Access.

Posted on 2011-05-12
10
Medium Priority
?
2,659 Views
Last Modified: 2012-05-11
Hi Team,

Is their any alternative to teh application.ontime that I use in excel.  I wnat a similar function in MS Access.
0
Comment
Question by:Sandesh555
  • 5
  • 5
10 Comments
 
LVL 12

Expert Comment

by:danishani
ID: 35748244
Yes check the On Timer event of your Form in combination with the Me.TimerInterval.

HTH,
Daniel
0
 

Author Comment

by:Sandesh555
ID: 35748246
Basically I want to run a macro created in MS Access every 5 minutes.
0
 

Author Comment

by:Sandesh555
ID: 35748261
Can you give me the syntax.   For example I am in Macro "ABC" and when I run the Macro "ABC", it should start to run itself every 5 minutes.  

So the Macro will call its own run every time in completed a run.
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 12

Expert Comment

by:danishani
ID: 35748277
Yes you can do this using a Form based on a TimerInterval of 300000.

In the Timer event of your Form you place this code:
DoCmd.RunMacro "mcrYourMacroName"

HTH,
Daniel
0
 
LVL 12

Expert Comment

by:danishani
ID: 35748288
The TimerInterval you place in the On Open event of your Form:

Me.TimerInterval = 300000

Then in the Timer event of your Form you place this code:
DoCmd.RunMacro "mcrYourMacroName"

HTH,
Daniel
0
 

Author Comment

by:Sandesh555
ID: 35748289
Sorry I am new to Access. :(  What to you mean by form and the timer event...
0
 
LVL 12

Expert Comment

by:danishani
ID: 35748296
Ok no problem, I can create a demo for you in Access, which version do you use?

Daniel
0
 

Author Comment

by:Sandesh555
ID: 35748310
I am working on a module and not on a user form.  If that's what you meant by Form..
0
 

Author Comment

by:Sandesh555
ID: 35748316
Access 2007
0
 
LVL 12

Accepted Solution

by:
danishani earned 2000 total points
ID: 35748379
Well yes, but you can open the form in Hidden mode, so it wont bother you.

You problably can code this also in VBA ...

 TimerDemo.accdb
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question