Kamis, 07 April 2016

Re: [MS_AccessPros] Looping through the forms collection



You are looping through the open forms OK, but you aren't specifically referencing each form.  You need to do:

    frmCurr.lblFormName.Visible = False

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)

On Apr 7, 2016, at 1:25 AM, Steve5 thaw5@suddenlink.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

The label's caption.

On 4/6/2016 6:12 PM, Liz Ravenwood liz_ravenwood@beaerospace.com [MS_Access_Professionals] wrote:

Is it the label you want to go invisible or the caption on the label? 

-----Original Message----- 
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] 
Sent: Wednesday, April 06, 2016 2:49 PM 
To: MS_Access_Professionals@yahoogroups.com 
Subject: [MS_AccessPros] Looping through the forms collection 

All of the forms in my Access 2007 database have a label named lblFormName. One of the forms has a command button whose click event I'd like to use to toggle the Visible property of the lblFormName on each of the open forms. I thought the code snippet below would to that, but turns out not. It toggles the visible property of only the lblFormName label in the form with the command button. This is the code to set the Visible property to false, I have similar lines of code to set the Visible property True. Would appreciate some advice. Thanks. Steve 

Dim frmCurr As Form 
For Each frmCurr In Forms 
lblFormName.Visible = False 
Next frmCurr 

Posted by: Steve5 <thaw5@suddenlink.net> 


Yahoo Groups Links 

This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. 


Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? The Yahoo Mail app is fast, beautiful and intuitive. Try it today!



Tidak ada komentar:

Posting Komentar