Iterating Controls

  • Thread starter Thread starter Jim K
  • Start date Start date
J

Jim K

I have option buttons on a page within a tab control that I want to loop
through to read and write data to, but can't figure out the correct syntax
to specify the control when using code in a module. Once I have this syntax,
I figure I can work out some sort of string building function to make the
controls's names even if there is no direct indexing system. Any ideas?

Thanks much!
Jim
 
Hi,


I doubt you can create new pages (new tabs) on an Access tab
control, at run time.

Me.TabCtlName.Pages(0).Caption = "NewCaption"


should change the caption of page (tab) 0...


You can make a tab in focus by:

Me.TabCtlName.Value = pageToFocus ' first page is page 0

You can detect a click on the tab through an AfterChange of the control, not
with a OnClick, since, as given in the previous line, it is the control
"value" that changes, when the tab changes.

You do not need any special syntax to reach the control IN the tab-control.
Do as if the tab control was not there, to reach these controls.




Hoping it may help,
Vanderghast, Access MVP
 
Back
Top