PDA

View Full Version : Access VBA-with out Form_Timer event



venkiatmarut
09-16-2008, 04:42 AM
Hi all,

I have a code. I need this code should run always. I don't have any forms in my Access project. I have only modules and macro.
:banghead:
Now how do I run the code with out using Form_timer event?
Is it possible to run some code continuosly with out timer event?



Thanks in advance,
Venki.

CreganTur
09-17-2008, 06:44 AM
Does it not work if you kick it off manually and have your code wrapped in an infinite loop?

venkiatmarut
10-15-2008, 02:54 AM
Does it not work if you kick it off manually and have your code wrapped in an infinite loop?

Obiviously, this is the first thing every one do. But it consumes total CPU time and no other program will work freely.
If you use the timer event, the process run in backgroud and causeing no burden to CPU.

I made a trail on this problem?

Best regards,
venki.:friends:

Bob Phillips
10-15-2008, 05:56 AM
Just thinking out aloud, throw away if you want, but you could fire up an Excel session and use Ontime in Excel to run a macro every n seconds.

venkiatmarut
10-15-2008, 09:28 AM
Just thinking out aloud, throw away if you want, but you could fire up an Excel session and use Ontime in Excel to run a macro every n seconds.


fire up an Excel session

I don't know how to do this, please let me know if you know the procedure or sample code.


run a macro every n seconds.
I checked this with a macro in my Access project. I created one macro which calls another macro for every 30 seconds. But it is also consuming total CPU time.

Thanks for your response.:friends:

Bob Phillips
10-15-2008, 03:44 PM
I checked this with a macro in my Access project. I created one macro which calls another macro for every 30 seconds. But it is also consuming total CPU time.

Is this purely in ACcess? What was the code?

venkiatmarut
10-15-2008, 11:48 PM
Is this purely in ACcess? What was the code?

In Access the macro creation is different from Excel. I will attach the screen shot of the macro check that.

The Macro1 calls the Runs the macro AUTOEXEC continuosly. That AUTOEXEC has calls a function which has actual code.
Repeat expression is the condition that macro executes when it's true. I kept it as true to run every time.

This is what I checked. If you have any other ideas share with us.
:friends: