Flashing Form

R

Rob

Hello

I've read the responses to KitCaz question and I used what was suggested
below.
It works great, however, I have a followup question.

Is there a way I can make the form/label to flash while macros are running?
At this point, the form pop-ups but doesn't flash while my macros are
running. It only starts to flash when the macro is done. I even added the
"docmd.RepaintObject" in my codes.

As always, you guys are doing a wonderful job in helping people out with
their Access problems.

Cheers!

Rob


KitCaz said:
How can I create a flashing / blinking label? I thought there might be a
simple property somewhere / somehow to do this, but I can't find anything.

Is my only recourse to set a form timer event and change the color with a
very short window? Seems like a lot to go through for such a simple
effect.

Rick has mentioned the problems with flashing labels. I suggest that you do
not use complementary colors (like red/green) and do not do anything faster
than 1/2 second. The following code starts in 1 second and flashes a label 5
times for a 1/2 second duration flash off and a 2 and 1/2 second duration
on. Set the TimerInterval property to 1000.

Private Sub Form_Timer()
Dim i As Integer

For i = 1 To 5
If Me.lblWarning.Visible = True Then
Me.lblWarning.Visible = False
Me.TimerInterval = 500
Else
Me.lblWarning.Visible = True
Me.TimerInterval = 2500
End If
Next i

End Sub

--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access

Was this post helpful to
 
R

Rob

Hi Klatuu

Thanks for your suggestion. However, Im a newbie to VB, so pls bear with me.
I converted the macro to VB using the Convert Macro to VB in Access.
However, the form is still not flashing while the macro is running. Is there
something that I'm missing in my code?

Thanks!
 
K

Klatuu

You say you converted it to VBA, then where did you put it? It should be
either embedded in your VBA code that is running and you should not be
executing the macro. It is hard for me to be more specific without the code
in front of me.
 
D

David C. Holley

Yes let the catapillars turn into butterflies. Among other things you
will also be able to use the progress bar ActiveX control.
 
D

David C. Holley

Trye the .Repaint method of the form object as in

[Forms]!formName.repaint

after each statement where the text on the form should be updated
 

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