Results 1 to 3 of 3
  1. #1
    Rhino373 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    65

    Timer Event - Why does this happen

    I'm attempting to display that my database is working through the following code in the form_timer() event:

    Code:
     
    Private Sub Form_Timer()
    If working.Caption = "working" Then
        working.Caption = "working."
    Else
        If working.Caption = "working." Then
            working.Caption = "working.."
        Else
            If working.Caption = "working.." Then
                working.Caption = "working..."
            Else
                working.Caption = "working"
            End If
        End If
    End If
    End Sub
    This works okay if the database isn't taking any actions. Once the database begins work, the label disappears. I use a macro to make the label visible and call the timer event. I then call the working event. I then call a function that hides the caption. The working event isn't a quick process, it can take about 5 minutes to compete. It basically opens 2 Excel files, runs a macro from one that makes changes to the other, running various filters and formatting to end up creating about 50 pdf documents then closes both files. While all this is occuring the "working" label disappears.



    Any ideas why this happens or how I can get around this?

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    If you're just trying to inform user of what is happening, you might want to use this approach.

    http://support.microsoft.com/kb/210474

  3. #3
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    ummm...the code you provided is obviously not doing it. without the whole picture, there's no way to know where the problem code is.

    you might also want to consider the fact that in windows, which is relevant in access as well, mouse clicking takes memory because each one is command, whether it is discarded or not.

    I have yet to figure out how to stop people from clicking when my code is running. too much clicking will freeze the program no matter what's running.

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

Similar Threads

  1. Pause / Wait / Countdown / Timer
    By DevGreg in forum Programming
    Replies: 2
    Last Post: 07-19-2022, 06:30 AM
  2. Timer routine in Access 2007
    By bcmarshall in forum Access
    Replies: 4
    Last Post: 04-25-2011, 04:23 PM
  3. Timer object
    By joki in forum Programming
    Replies: 7
    Last Post: 03-17-2011, 08:50 AM
  4. Replies: 2
    Last Post: 11-30-2010, 10:06 AM
  5. Closing the application with some timer
    By reachvali in forum Programming
    Replies: 1
    Last Post: 05-18-2010, 11:28 PM

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