Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: hourglass

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

hourglass
Sandy 29.09.2006 17:06:02
Hi all. I am working in A2k and having trouble with hourglass.

I have a form which takes several seconds to load, so I want the mouse
pointer to turn to an hourlgass when the menu item is clicked to open the
form, and then back to regular pointer when the form activates.

From the main menu:
Private Sub Label141_Click()
DoCmd.Hourglass True
DoCmd.OpenForm ("frmLookupSrch")
End Sub

Then in frmLookupSrch:
Private Sub Form_Activate()
DoCmd.Hourglass False
End Sub

Using this code, the mouse pointer never turns to an hourglass. I tried
just the hourglass code alone, and it works fine (turns to hourglass the
instant I click the menu label). I even tried writing it so that it runs
hourglass and then goes to a separate event statement (Label141_Click_A) to
open the form, but still the hourglass will not show.

Please help me before I drop-kick my pc.

TIA, Sandy
RE: hourglass
Klatuu 29.09.2006 17:21:02
I don't know if this will work, but try reversing your statments.
DoCmd.OpenForm ("frmLookupSrch")
DoCmd.Hourglass True

"Sandy" wrote:

[Quoted Text]
> Hi all. I am working in A2k and having trouble with hourglass.
>
> I have a form which takes several seconds to load, so I want the mouse
> pointer to turn to an hourlgass when the menu item is clicked to open the
> form, and then back to regular pointer when the form activates.
>
> From the main menu:
> Private Sub Label141_Click()
> DoCmd.Hourglass True
> DoCmd.OpenForm ("frmLookupSrch")
> End Sub
>
> Then in frmLookupSrch:
> Private Sub Form_Activate()
> DoCmd.Hourglass False
> End Sub
>
> Using this code, the mouse pointer never turns to an hourglass. I tried
> just the hourglass code alone, and it works fine (turns to hourglass the
> instant I click the menu label). I even tried writing it so that it runs
> hourglass and then goes to a separate event statement (Label141_Click_A) to
> open the form, but still the hourglass will not show.
>
> Please help me before I drop-kick my pc.
>
> TIA, Sandy
RE: hourglass
Sandy 29.09.2006 17:30:01
I would have never thought of that! But it didn't work anyway... reversing
the statements made the pointer turn to hourglass and stay that way. The
form activate code didn't turn it back :(


"Klatuu" wrote:

[Quoted Text]
> I don't know if this will work, but try reversing your statments.
> DoCmd.OpenForm ("frmLookupSrch")
> DoCmd.Hourglass True
>
> "Sandy" wrote:
>
> > Hi all. I am working in A2k and having trouble with hourglass.
> >
> > I have a form which takes several seconds to load, so I want the mouse
> > pointer to turn to an hourlgass when the menu item is clicked to open the
> > form, and then back to regular pointer when the form activates.
> >
> > From the main menu:
> > Private Sub Label141_Click()
> > DoCmd.Hourglass True
> > DoCmd.OpenForm ("frmLookupSrch")
> > End Sub
> >
> > Then in frmLookupSrch:
> > Private Sub Form_Activate()
> > DoCmd.Hourglass False
> > End Sub
> >
> > Using this code, the mouse pointer never turns to an hourglass. I tried
> > just the hourglass code alone, and it works fine (turns to hourglass the
> > instant I click the menu label). I even tried writing it so that it runs
> > hourglass and then goes to a separate event statement (Label141_Click_A) to
> > open the form, but still the hourglass will not show.
> >
> > Please help me before I drop-kick my pc.
> >
> > TIA, Sandy
RE: hourglass
Klatuu 29.09.2006 17:35:01
Be sure when you are turning it off, set it to False :)
(sorry, but sometimes we all miss the obvious)
Try changing to the Open or Load events of the form.

"Sandy" wrote:

[Quoted Text]
> I would have never thought of that! But it didn't work anyway... reversing
> the statements made the pointer turn to hourglass and stay that way. The
> form activate code didn't turn it back :(
>
>
> "Klatuu" wrote:
>
> > I don't know if this will work, but try reversing your statments.
> > DoCmd.OpenForm ("frmLookupSrch")
> > DoCmd.Hourglass True
> >
> > "Sandy" wrote:
> >
> > > Hi all. I am working in A2k and having trouble with hourglass.
> > >
> > > I have a form which takes several seconds to load, so I want the mouse
> > > pointer to turn to an hourlgass when the menu item is clicked to open the
> > > form, and then back to regular pointer when the form activates.
> > >
> > > From the main menu:
> > > Private Sub Label141_Click()
> > > DoCmd.Hourglass True
> > > DoCmd.OpenForm ("frmLookupSrch")
> > > End Sub
> > >
> > > Then in frmLookupSrch:
> > > Private Sub Form_Activate()
> > > DoCmd.Hourglass False
> > > End Sub
> > >
> > > Using this code, the mouse pointer never turns to an hourglass. I tried
> > > just the hourglass code alone, and it works fine (turns to hourglass the
> > > instant I click the menu label). I even tried writing it so that it runs
> > > hourglass and then goes to a separate event statement (Label141_Click_A) to
> > > open the form, but still the hourglass will not show.
> > >
> > > Please help me before I drop-kick my pc.
> > >
> > > TIA, Sandy
RE: hourglass
Sandy 29.09.2006 18:00:02
I didn't change the form activate code, so it was still set to hourglass =
false.

I have tried it on Open, Load, and now Activate... every possible way I
could think of before coming here to ask for help. This is why I am so
frustrated at this point, because this seems so simple and yet doesn't work
any way I try it.

Thanks for your suggestions though, and if you have any more (or anyone else
does) I'd appreciate hearing them.


"Klatuu" wrote:

[Quoted Text]
> Be sure when you are turning it off, set it to False :)
> (sorry, but sometimes we all miss the obvious)
> Try changing to the Open or Load events of the form.
>
> "Sandy" wrote:
>
> > I would have never thought of that! But it didn't work anyway... reversing
> > the statements made the pointer turn to hourglass and stay that way. The
> > form activate code didn't turn it back :(
> >
> >
> > "Klatuu" wrote:
> >
> > > I don't know if this will work, but try reversing your statments.
> > > DoCmd.OpenForm ("frmLookupSrch")
> > > DoCmd.Hourglass True
> > >
> > > "Sandy" wrote:
> > >
> > > > Hi all. I am working in A2k and having trouble with hourglass.
> > > >
> > > > I have a form which takes several seconds to load, so I want the mouse
> > > > pointer to turn to an hourlgass when the menu item is clicked to open the
> > > > form, and then back to regular pointer when the form activates.
> > > >
> > > > From the main menu:
> > > > Private Sub Label141_Click()
> > > > DoCmd.Hourglass True
> > > > DoCmd.OpenForm ("frmLookupSrch")
> > > > End Sub
> > > >
> > > > Then in frmLookupSrch:
> > > > Private Sub Form_Activate()
> > > > DoCmd.Hourglass False
> > > > End Sub
> > > >
> > > > Using this code, the mouse pointer never turns to an hourglass. I tried
> > > > just the hourglass code alone, and it works fine (turns to hourglass the
> > > > instant I click the menu label). I even tried writing it so that it runs
> > > > hourglass and then goes to a separate event statement (Label141_Click_A) to
> > > > open the form, but still the hourglass will not show.
> > > >
> > > > Please help me before I drop-kick my pc.
> > > >
> > > > TIA, Sandy
Re: hourglass
"Ron2006" <ronnemec[ at ]hotmail.com> 29.09.2006 18:58:04
Just a wild guess

Try a repaint between the hourglass and openform.

[Quoted Text]
> > > > > From the main menu:
> > > > > Private Sub Label141_Click()
> > > > > DoCmd.Hourglass True

me.repaint

> > > > > DoCmd.OpenForm ("frmLookupSrch")
> > > > > End Sub


Ron

Re: hourglass
Sandy 29.09.2006 19:39:02
Thanks Ron, but I actually tried that just this morning after seeing it in
another hourlgass post. Still no bueno.


"Ron2006" wrote:

[Quoted Text]
> Just a wild guess
>
> Try a repaint between the hourglass and openform.
>
> > > > > > From the main menu:
> > > > > > Private Sub Label141_Click()
> > > > > > DoCmd.Hourglass True
>
> me.repaint
>
> > > > > > DoCmd.OpenForm ("frmLookupSrch")
> > > > > > End Sub
>
>
> Ron
>
>
Re: hourglass
"Dirk Goldgar" <dg[ at ]NOdataSPAMgnostics.com> 30.09.2006 12:42:32
"Sandy" <Sandy[ at ]discussions.microsoft.com> wrote in message
news:9633E034-54E1-4618-A990-3B72CC7C429A[ at ]microsoft.com
[Quoted Text]
> Hi all. I am working in A2k and having trouble with hourglass.
>
> I have a form which takes several seconds to load, so I want the mouse
> pointer to turn to an hourlgass when the menu item is clicked to open
> the form, and then back to regular pointer when the form activates.
>
> From the main menu:
> Private Sub Label141_Click()
> DoCmd.Hourglass True
> DoCmd.OpenForm ("frmLookupSrch")
> End Sub
>
> Then in frmLookupSrch:
> Private Sub Form_Activate()
> DoCmd.Hourglass False
> End Sub
>
> Using this code, the mouse pointer never turns to an hourglass. I
> tried just the hourglass code alone, and it works fine (turns to
> hourglass the instant I click the menu label). I even tried writing
> it so that it runs hourglass and then goes to a separate event
> statement (Label141_Click_A) to open the form, but still the
> hourglass will not show.

Try inserting a DoEvents statement:

Private Sub Label141_Click()
DoCmd.Hourglass True
DoEvents
DoCmd.OpenForm ("frmLookupSrch")
End Sub


--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net