Hiding a label

S

scott

I have a label control called "lbl_Results" on a subform that only becomes
visible if a user clicks a button. Is there a way to set it's visible
property to false after 10 seconds or so?
 
K

Ken Snell \(MVP\)

Use the form's Timer event.

In the code for the button's click event, add this code step:

Me.TimerInterval = 10000



Then add an event procedure for the form's Timer event:

Private Sub Form_Timer()
Me.TimerInterval = 0
Me.NameOfSubformControl.Form.lbl_Results.Visible = False
End Sub
 
S

scott

what time duration is 10000?


Ken Snell (MVP) said:
Use the form's Timer event.

In the code for the button's click event, add this code step:

Me.TimerInterval = 10000



Then add an event procedure for the form's Timer event:

Private Sub Form_Timer()
Me.TimerInterval = 0
Me.NameOfSubformControl.Form.lbl_Results.Visible = False
End Sub
 
K

Ken Snell \(MVP\)

Sorry - forgot to mention that. As Dirk posted, it's ten thousand
milliseconds. TimerInterval is in millisecond increments.
 
Top