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  

Check Control if Visible or hidden



 
 
Thread Tools Display Modes
  #1  
Old March 4th, 2010, 09:37 PM posted to microsoft.public.access.forms
Abe Katz
external usenet poster
 
Posts: 43
Default Check Control if Visible or hidden

Hello All,
How can I check thru code, if a control on the form is visible or it's
hidden?

Thanks in advance
Abe


  #2  
Old March 4th, 2010, 10:10 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Check Control if Visible or hidden

On Thu, 4 Mar 2010 16:37:21 -0500, "Abe Katz" wrote:

Hello All,
How can I check thru code, if a control on the form is visible or it's
hidden?

Thanks in advance
Abe


If Forms!yourformname!controlname.Visible = True Then
it's visible
Else
it's hidden
End If

You can use Me!controlname if the code is on the same form as the control.
--

John W. Vinson [MVP]
  #3  
Old March 4th, 2010, 10:17 PM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default Check Control if Visible or hidden

Private Sub Command2_Click()

If ControlName.Visible = True Then
MsgBox "Visible"
Else
MsgBox "Not Visible"
End If

End Sub

You can, of course, replace the message boxes with other code, as appropriate.


--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201003/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 04:29 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.