Flashing Message

N

NevilleT

This is a "nice to have". I currently have a form that has a number of
buttons to load other forms and reports. Some take a few seconds to load so
I display a bright red label saying "Loading" using the on click event.

Me![lblLoading].Visible = True
Me.Repaint

I need to use the repaint or it will not display until after the next form
is loaded. What I would ideally like to do is have the label flash i.e. turn
visible off and on. I can use the timer event but it does not refresh even
though I put a repaint in the code.

Private Sub Form_Timer()
If Me.lblLoading.Visible = True Then
Me.lblLoading.Visible = False
Me.Refresh
Else
Me.lblLoading.Visible = True
Me.Refresh
End If
End Sub

I trigger the event by putting the following line in the button on click event
Me.TimerInterval = 1000
When I am finished the TimerInterval is set to 0

Has anyone successfully created a flashing message during loading?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top