Hide Command button based on a loop timer

  • Thread starter Jesse via AccessMonster.com
  • Start date
J

Jesse via AccessMonster.com

Hello,
I am trying to have a command button and a box auto hide based on a
designated time set by me. How is the best way to go about this?
 
P

PieterLinden via AccessMonster.com

Jesse said:
Hello,
I am trying to have a command button and a box auto hide based on a
designated time set by me. How is the best way to go about this?

Something like this maybe?
(TimerInterval is originally set to 5000 ms).

Private Sub Form_Timer()
Me.lblHere.Visible = Not Me.lblHere.Visible
Me.lblGone.Visible = Not Me.lblGone.Visible
Me.TimerInterval = 0 'shut off the timer
End Sub

so just substitute
Me.cmdWhatever.Visible = Not Me.cmdWhatever.Visible
Me.txtOther.Visible = Not Me.txtOther.Visible

(I guess you could declare a boolean and flip it, using Not... same basic
idea, though...
 
J

Jesse via AccessMonster.com

Im going to try this, Thank you. I will let you know how it works for what im
looking for but it looks good to me.
 
S

Skypilot via AccessMonster.com

Ok, The code works great but it becomes visible again after the time i
specified. Once visible is false i dont want it to come back. I tried doing
this to the code but it didnt work.
 

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