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 / Modules / DAO / VBA / March 2005

Tip: Looking for answers? Try searching our database.

Referencing Toggle Buttons in a loop

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eddie's Bakery and Cafe' - 28 Feb 2005 23:49 GMT
I have a situation where I need to reference multiple toggle buttons by
reference. I need to create a loop where each toggle button object is
individual controlled.  For example, the following pseudo-code demonstrates
my intent:

While  (togglebuttone_object <> Null)
   ToggleButtonObject.Caption = “Some Value”
   ToggleButtonObject = Next ToggleButtonObject
Wend

Your suggestions are greatly appreciated

Thanks,

Eddie  
Douglas J. Steele - 01 Mar 2005 00:10 GMT
Dim ctlCurr As Control

  For Each ctlCurr In Me.Controls
     If TypeOf ctlCurr Is ToggleButton
        ctlCurr.Caption = ...
     End If
  Next ctlCurr

Of course, if you've only got a few, it's probably easier to simply refer to
them by name.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

>I have a situation where I need to reference multiple toggle buttons by
> reference. I need to create a loop where each toggle button object is
[quoted text clipped - 12 lines]
>
> Eddie
Eddie's Bakery and Cafe' - 01 Mar 2005 02:25 GMT
Thanks Douglas,

I will give this a try

> Dim ctlCurr As Control
>
[quoted text clipped - 23 lines]
> >
> > Eddie
 
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.