Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2005

Tip: Looking for answers? Try searching our database.

Variable Label Name

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sven Daems - 09 May 2005 16:39 GMT
Hy group

I've a great number of labels, all called lbl1,lbl2,lbl3,... When the form
opens, there set to visible = No.  When running a code, I've in a loop a
counter who has the value 1, 2, 3, ... When the counter has the value 1, the
label lbl1 has to be visible, when the counter has the value 2, label lbl1
and lbl2 has to be visible, and so on... I know I've seen a code on the msdn
website where you can adres to a label with a variable labelname. I've tried
things
like lbl & X.Visible = true or lbl(X).Visible = true (X is the counter) but
it doesn't work.

Does anybody has a solution?
Dirk Goldgar - 09 May 2005 16:49 GMT
> Hy group
>
[quoted text clipped - 9 lines]
>
> Does anybody has a solution?

   Me.Controls("lbl" & X).Visible = True

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Sven Daems - 09 May 2005 16:57 GMT
super, thanxs

> > Hy group
> >
[quoted text clipped - 11 lines]
>
>     Me.Controls("lbl" & X).Visible = True
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.