Hiding a label

  • Thread starter Thread starter scott
  • Start date Start date
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?
 
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
 
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
 
Sorry - forgot to mention that. As Dirk posted, it's ten thousand
milliseconds. TimerInterval is in millisecond increments.
 
Back
Top