Consulting

View Poll Results: Is it possible to run vba code continuosly with out using Form_Timer event?

Voters
1. You may not vote on this poll
  • Possible

    0 0%
  • Not possible

    1 100.00%
Results 1 to 7 of 7

Thread: Access VBA-with out Form_Timer event

  1. #1

    Question Access VBA-with out Form_Timer event

    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.

    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.

  2. #2
    VBAX Master CreganTur's Avatar
    Joined
    Jan 2008
    Location
    Greensboro, NC
    Posts
    1,676
    Location
    Does it not work if you kick it off manually and have your code wrapped in an infinite loop?
    -Randy Shea
    I'm a programmer, but I'm also pro-grammar!
    If your issue is resolved, please use Thread Tools to mark your thread as Solved!

    PODA (Professional Office Developers Association) | Certifiable | MOS: Access 2003


  3. #3
    Quote Originally Posted by CreganTur
    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.
    Thanks in Advance,
    Venki

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    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.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5

    Lightbulb

    Quote Originally Posted by xld
    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.
    Thanks in Advance,
    Venki

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by venkiatmarut
    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?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  7. #7

    Arrow

    Quote Originally Posted by xld
    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.
    Thanks in Advance,
    Venki

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •