|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 > >
|
|
"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)
|
|
|