Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2004
    Location
    Manchester, England
    Posts
    23

    Unanswered: Hourglass doesn't appear using label_click event

    Hi All,

    I've been searching the archives on this one, but yet to find a definitive answer so maybe someone out there can make my day!

    I have some code which runs from a label_click() event and I want the hourglass to appear while the code is running. Sholud be easy- DoCmd.Hourglass True at the top of the code the False at the bottom. Doesn't work however (though it does work when you step through the code).

    Possible solutions I've found so far are placing transparent command buttons over the label and using the button event, or running the code in a Timer event set by the click event. But surely it must be possible to get the hourglass to appear at any point without using workarounds?

    Any help greatly appreciated,

    JBee

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    No reason for it not to run off of the label. What kind of code is running between starting and stopping the Hourglass? First guess would be that the code is executing so fast that the Hourglass doesn't really have time to appear. Under this condition it would still appear when stepping thru the code.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Try placing a messagebox immediately after the DoCmd.Hourglass True and move the cursor away from the box when it pops up and see if the Hourglass appears.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    agree with Missinglinq..... its more likely that the code is execting so fast that you dont see it.

    alternatively it could be a refresh / screen problem.. or posibly even low resources problem. Ive seen this sort of thing occasionally esepcially if the computer is low on resources... to many programs open, running some programs with memory leaks, or not closing your own objects when done (eg recordsets etc...)

    to diagnose whats happening do a debug and step through the code and see if the hourglass appears. sometimes you may need to allow windows time to catch up... occasionally i've cleared this sort of issue by issuing a "do events" to allow other processess to do something and then continue.
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Aug 2004
    Location
    Manchester, England
    Posts
    23
    Thanks Guys,

    I tried using DoEvents but it made no difference. The code takes a few seconds to run as it involves a fairly complex query so I'm sure it's nothing to do with everything happening too quickly. If I replace the label with a command button the hourglass works, but not from a label or an image

Posting Permissions

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