Docmd.Hourglass

doulostheou

Registered User.
Local time
Today, 00:39
Joined
Feb 8, 2002
Messages
314
I have a form that is slow in pulling up. There is a button on another form that opens it. I cannot seem to get the hourglass to pull up until after the form opens (which apparently ruins the point of calling the hourglass in the first place). Can anybody see where I have erred in the code below?

Private Sub AmHor_Click()
On Error GoTo Err
DoCmd.Hourglass True
DoCmd.OpenForm "AmHor"
Me.Visible = False
GetOut:
DoCmd.Hourglass False
Exit Sub
Err:
MsgBox Err.Description
Resume GetOut
End Sub
 
Access won t wait until the form is opened to execute th following line of your code...
DoCmd.Hourglass False.

Instead, you must deactivate the hourglass from the form you open.

Alex
 
Thanks! I'll give it a try, by closing it from the form.
 

Users who are viewing this thread

Back
Top Bottom