access a control few layers down...

  • Thread starter Thread starter Ben
  • Start date Start date
B

Ben

Hi all,

I have a form, in it, I have a tab control with 3 tabs. On the first tab, I
have a combo box. Next to it I have I have a command button, that fetches
all records from a table based on the value of the combo box. How, I can't
access the events or properties of this control.

I tried to write an click event procedure of the button but was unable to
refer to the value of the combo box. I did something like this:

sub clickevent

form1.tabcontrol....

end sub


But intellisense wouldn't pick up anthing. What am i referencing wrong?

Thanks,

Ben

--
 
Regardless of which tab it is on, a control is still on the form, so it
should still be
Me.ComboBoxName.

Unless you are using a subform on the tab.
 
If I understand you correctly, you have a form with a tab control and a
couple of other controls conatined within the tab control. If that is the
case, you don't need to reference the tab control when trying to reference
the other controls.

If the combo box is named cboExample and the tab control is tabcontrol1, I
think you are trying to refernce the combo box in the follwoing manner:

form1.tabcontrol1.cboExample --> this won't work

you simply reference the combo box as follows:
form1.cboExample....
or
me.cboExample...
or just cboExample...

give it a try
 
Back
Top