A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

DoCmd.HourGlass not working



 
 
Thread Tools Display Modes
  #1  
Old March 10th, 2010, 03:45 PM posted to microsoft.public.access.forms
cr113
external usenet poster
 
Posts: 33
Default DoCmd.HourGlass not working


I've got a form with a treeview object. When I double click on a
particular node in the treeview I open a second form. The second form
takes awhile to populate so I want to display an hourglass cursor. I
can't get the hourglass to display. What's odd is that it works from a
button click event but not the treeview double click event.


This code doesn't work:

Private Sub TreeView1_DblClick()
Call DoCmd.Hourglass(True)
DoCmd.OpenForm "SecondForm"
End Sub

This code works:

Private Sub Button_Click()
Call DoCmd.Hourglass(True)
DoCmd.OpenForm "SecondForm"
End Sub

The only difference is the event. What is going on?
  #2  
Old March 10th, 2010, 04:47 PM posted to microsoft.public.access.forms
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default DoCmd.HourGlass not working

Probably that you aren't using the Node Click event.

BTW, a simple

DoCmd.Hourglass True

DoCmd.Hourglass False

turns it on and off
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


"cr113" wrote in message
...

I've got a form with a treeview object. When I double click on a
particular node in the treeview I open a second form. The second form
takes awhile to populate so I want to display an hourglass cursor. I
can't get the hourglass to display. What's odd is that it works from a
button click event but not the treeview double click event.


This code doesn't work:

Private Sub TreeView1_DblClick()
Call DoCmd.Hourglass(True)
DoCmd.OpenForm "SecondForm"
End Sub

This code works:

Private Sub Button_Click()
Call DoCmd.Hourglass(True)
DoCmd.OpenForm "SecondForm"
End Sub

The only difference is the event. What is going on?



  #3  
Old March 10th, 2010, 05:46 PM posted to microsoft.public.access.forms
cr113
external usenet poster
 
Posts: 33
Default DoCmd.HourGlass not working

On Mar 10, 10:47*am, "Arvin Meyer [MVP]" wrote:
Probably that you aren't using the Node Click event.


That ended up being my workaround. But why doesn't it work in the
double click event? Is that a bug?
  #4  
Old March 11th, 2010, 04:40 PM posted to microsoft.public.access.forms
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default DoCmd.HourGlass not working

"cr113" wrote in message
...
On Mar 10, 10:47 am, "Arvin Meyer [MVP]" wrote:
Probably that you aren't using the Node Click event.


That ended up being my workaround. But why doesn't it work in the
double click event? Is that a bug?

Not a bug, that's the way a TreeView works
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:09 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.