Results 1 to 2 of 2
  1. #1
    Join Date
    May 2012
    Posts
    5

    Timer event vs. longrunning line: concurrency issue

    I have a single line of code that takes a long time to run. (This is because it is either accessing or writing to a network location.)

    I want to run a Form_Timer event during this to animate a rotating hourglass (just to show the user something is happening so they don't go click-crazy).

    I learned VBA doesn't support concurrency, which I take to mean I can't run the Timer event while my longrunning subroutine executes. Because my longrunning subroutine really is a single longrunning line of code, I can't use DoEvents to free up the processor.

    Is there a concurrency workaround for this case, or should I find another way to let the user know their system is at work?

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I want to run a Form_Timer event during this to animate a rotating hourglass
    You can set the cursor to busy (hourglass) using Docmd.hourglass True and Docmd.hourglass False.

    Or you can check out:
    http://www.vbaexpress.com/kb/getarticle.php?kb_id=929

    or
    http://www.dbforums.com/microsoft-ac...nd-cursor.html

    or maybe
    http://www.ehow.com/how_7523999_change-cursor-vba.html

    Or maybe even
    http://access.mvps.org/access/api/api0044.htm

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Timer Event - Why does this happen
    By Rhino373 in forum Programming
    Replies: 2
    Last Post: 05-26-2011, 07:18 PM
  2. Calling Access VBA subroutine from an Excel VBA subroutine
    By richard_yolland in forum Programming
    Replies: 0
    Last Post: 02-16-2011, 11:30 AM
  3. Replies: 0
    Last Post: 02-01-2011, 04:49 AM
  4. Replies: 2
    Last Post: 11-30-2010, 10:06 AM
  5. Exception When Executing In Java But Runs In MS Access DB Manually
    By vasuresh.kishor@gmail.com in forum Access
    Replies: 0
    Last Post: 03-11-2010, 12:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums