Results 1 to 11 of 11
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919

    DoCmd.Hourglass not working


    Of the many posts I found, Marshal Barton's seemed to offer the most promise. However, I can't get it to work no matter where I've tried. I.e., OnClick, OnOpen, etc
    Code:
    DoCmd.Hourglass True
    Me.Repaint
    DoEvents
    Any suggestions?

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    You say it doesn't work but have you checked that the code fires/runs.
    In the On Click event of a button, for example, it should change the cursor to the hourglass.
    Does that not happen for you?
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    As I said, if I try it in the OnOpen event or one of the OnClick events it does not work.

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,938
    You do know that the hourglass is now just a revolving circle?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Have checked that the code does actually fire/run.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by Welshgasman View Post
    You do know that the hourglass is now just a revolving circle?
    I still get the hourglass

    If I use the posted code in Access
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  7. #7
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Nope. Anyway to get the revolving circle to appear alongside the pointer?

    In my application, it would really be better to change the pointer itself. Case in point is when one turns on the hourglass which is followed by the dropdown of the combo box. As soon as the revolving circle is hovered over one of the combo choices, the revolving ceases. With that, it's no longer intuitively obvious to the user that the app is waiting.

  8. #8
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,938
    Quote Originally Posted by Bob Fitz View Post
    I still get the hourglass

    If I use the posted code in Access
    Really?
    I just tried the code below and just got the stupid circle you see when waiting for webpages to load etc?

    Code:
    Private Sub Command38_Click()
    Dim i As Integer
    
    
    DoCmd.Hourglass True
    For i = 1 To 100
        Debug.Print "count is " & i
        DoEvents
    Next
    DoCmd.Hourglass False
    End Sub
    Comment out the True and nothing is shown, with True running, I get that blue circle.
    Win10 Pro 21H2 with Access 2007
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  9. #9
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Mouse pointer is a Windows setting. If you want something other than what your current options are, I believe you'll have to use an API.
    FWIW, that simple code works for me on a form open, but I do get the circle, seeing as how that's the option (and the options are influenced by the Windows schemes).
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  10. #10
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    I thought as much. I have much "bigger fish to fry" today, so now knowing about the revolving circle versus hourglass, "I'll close out the OP and move on.

  11. #11
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,938

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

Similar Threads

  1. DoCMD.Close not always working
    By Canadiangal in forum Programming
    Replies: 14
    Last Post: 10-21-2020, 07:08 PM
  2. DoCmd.Close Not Working
    By kdbailey in forum Access
    Replies: 6
    Last Post: 12-11-2013, 07:35 PM
  3. DoCmd.OutputTo not working
    By arunkumar213 in forum Access
    Replies: 1
    Last Post: 09-08-2011, 10:41 PM
  4. No Report, Hourglass Disappears
    By EdSwartz in forum Reports
    Replies: 0
    Last Post: 02-19-2010, 11:38 AM
  5. docmd.runsql not working
    By Rameez in forum Programming
    Replies: 3
    Last Post: 08-07-2009, 10:07 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