"Please Wait" message with animation

Elana

Registered User.
Local time
Today, 04:59
Joined
Apr 19, 2000
Messages
232
Hi-

I've created a Please Wait form to display while a semi-lengthy process runs. I used the example from the MS Knowledge Base:

DoCmd.OpenForm "frmpleasewait", , , , acFormReadOnly, acWindowNormal
DoCmd.Hourglass True
DoCmd.RepaintObject acForm, "frmpleasewait"
DoCmd.RunMacro "macrunskiappqueries"
DoCmd.Close acForm, "frmpleasewait", acSaveNo

All works fine. Then I thought it would be fun to stick some animation on the form to show the user that something is happening, so I used some code example that Ghudson provided that is easy and works:

(Form OnOpen event)

clockname = clockname + 1
If clockname > 4 Then
clockname = 1
End If

Select Case clockname

Case 1
Me![Image7].Visible = False
Me![Image1].Visible = True

Case 2
Me![Image1].Visible = False
Me![Image2].Visible = True

Case 3
Me![Image2].Visible = False
Me![Image3].Visible = True

Case 4
Me![Image3].Visible = False
Me![Image4].Visible = True

End Select


Work great and looks like the image is animated, but only when I just open the form on its own. When I open it using the code that runs the queries, the "animation" doesn't work. I'm assuming this is because I'm using RepaintObject.

Any ideas as to what I can do to make this work properly?
 
Last edited:

Users who are viewing this thread

Back
Top Bottom