Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access tabstrip 1

Status
Not open for further replies.

leroivvd

Technical User
Jul 21, 2008
6
RO
Hi all!
Maybe it's sound a little stupid but how can I add vba access controls in a tabstrip?
I have already created my controls (about 10 : textbox, combobox...) and now, I created a tabstrip and I want to add these controls in it. I tried to move them on top of my tabstrip but .. when I run my form there aren't dispayed at all. Why?
Thank you!
 
select the controles and right click the tab that you want to paste then on to and select paste
 
What exactly to select?
Select my controls and then right click on my tabstrip and paste? Please be a little more specific. I have Access 2002. Thank you!
 
In design view select all the controls that you want to be on the tab and press CTRL-X

let us say that on your tab strip you have a tab called page1 and a tab called page2 and you want the controles to be on page1 then right click on page 1 and press CTRL-V

 
I have selected my controls on the form and right click on them , then copy and I selected then the tab from my tabstrip control and right clik and paste. My controls appears in design view on tabstrip but when I run the form stiil doesn't appers!
 
Another strange thing I observe is :
I create new controls and add in my tabstrip control but from all created only listboxes are visible when I run my form !! the others are invisible!
 
The reason is that they all stay below the tabstrip. Unfortunatelly, seems that it is not possible to make the tabstip cooperate with access form and its controls. The same (or worse) problem with the tabstrip is for excel worksheet.
The native environment for tabstrip is MSForms userform and its controls. You can try to add them (i.e. MSForms controls) to the tabstrip, they seem to work.

combo
 
Sorry but is a little unclear to me... What is MSForms..? This means that I must convert my controls ..in other..?How can I do that?
 
There is no access tabstrip. If you look at its properties, you can find Microsoft Forms 2.0 LE class, Forms.TabStrip.1 class.

In other ms office (or with VBA support) applications in VBE you can find the userform and set of controls as the dialog design provider. All controls with Microsoft Forms 2.0 prefix in access are from there and work best on the userform. Teir library name is MSForms. When you add the tabstrip to the access form you can find a reference to Microsoft Forms 2.0 Object Library in references and MSForms library in object browser.

Other available controls (activex controls) provided by other libraries can be added, if registered, to the form too, this is the way VBA works. You can't convert the control, just accept the way they behave on access form.

combo
 
they are not invisible thay are hiding behind the tab strip

try this


create a comand button on the form

on the click event put this code
Code:
dim ctl as control

for each ctl in me.controls
msgbox ctl.name & "-" & ctl.visible

next

in order for controls to be on the tab create then on the tab

1)click on the control on the toolbox drag the mouse over the tab(the tab will turn black) and click on the tab

what happaneds when you create a control not on the tab is it visible per haps you have set the default of the control to invisible
 
Why using a TabStrip instead of the standard (in access) TabControl ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top