PC Review


Reply
Thread Tools Rate Thread

access a control few layers down...

 
 
Ben
Guest
Posts: n/a
 
      25th Jul 2008
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

--

 
Reply With Quote
 
 
 
 
Klatuu
Guest
Posts: n/a
 
      25th Jul 2008
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.
--
Dave Hargis, Microsoft Access MVP


"Ben" wrote:

> 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
>
> --
>

 
Reply With Quote
 
Scott Shearer
Guest
Posts: n/a
 
      25th Jul 2008
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



"Ben" wrote:

> 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
>
> --
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Advanced visibility control - layers? Michael Moser Microsoft Powerpoint 2 26th Feb 2010 09:50 AM
Layers?: Compact or compounding layers to table and cells =?Utf-8?B?TWltaSBU?= Microsoft Frontpage 2 18th Nov 2006 12:06 PM
Persistence layers for Access? =?Utf-8?B?RGlyaw==?= Microsoft Access VBA Modules 3 13th Feb 2006 03:54 PM
RE: Transparent control background - wrong layers displayed Serg Kuryata [MS] Microsoft Dot NET Compact Framework 0 13th Sep 2004 10:41 PM
C# GDI+ layers control problem pei_world Microsoft C# .NET 1 19th Aug 2004 02:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:14 PM.