A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hide Command button based on a loop timer



 
 
Thread Tools Display Modes
  #1  
Old February 17th, 2010, 11:20 PM posted to microsoft.public.access.forms
Jesse via AccessMonster.com
external usenet poster
 
Posts: 29
Default Hide Command button based on a loop timer

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?

--
Message posted via http://www.accessmonster.com

  #2  
Old February 18th, 2010, 08:15 AM posted to microsoft.public.access.forms
PieterLinden via AccessMonster.com
external usenet poster
 
Posts: 307
Default Hide Command button based on a loop timer

Jesse wrote:
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...

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201002/1

  #3  
Old February 18th, 2010, 03:16 PM posted to microsoft.public.access.forms
Jesse via AccessMonster.com
external usenet poster
 
Posts: 29
Default Hide Command button based on a loop timer

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.

PieterLinden wrote:
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...


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201002/1

  #4  
Old February 18th, 2010, 05:05 PM posted to microsoft.public.access.forms
Skypilot via AccessMonster.com
external usenet poster
 
Posts: 5
Default Hide Command button based on a loop timer

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.
Private Sub Form_Timer()
Me.lblHere.Visible = Not Me.lblHere.Visible = False
Me.lblGone.Visible = Not Me.lblGone.Visible = False
Me.TimerInterval = 0 'shut off the timer
End Sub


PieterLinden wrote:
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...


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201002/1

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.