0
votes

I have a tabbed form in Access and on one tab, I'd like to create an ActiveX TreeView object. When I go to build this object and drag it to the tab, it attaches itself to the general form instead of the tab. This puts the control over top of all the tabs instead of the tab I want it in. How do I attach the ActiveX control to the tab and not the entire form?

I've done a number of different "moves" to try and get it to attach and I've looked through the options to see if there is an easy way to attach it but nothing actually defines how the control is attached unlike a normal Access form control that is contained in the tab.

I would like to keep the extra forms to a minimum and maintain a single, tabbed form with separate controls on each tab.

1
tabbed form - what exactly do you mean? A Navigation form? A regular form with a tab control on it? - Andre
A regular form with a tabbed control. - M. Hump
Hm, I think I remember that this worked for me without problems. I'll check tomorrow. Please add your Access version to the tag list. - Andre
Yes, works for me with Access 2016. I create a form, insert a Tab Control, add a Microsoft TreeView Control, version 6.0 to page 2 of the Tab control, and it is only on that page. - Andre
Then maybe I'm making the tree view control (6.0) incorrectly. After making all the tabs, I go to the one I need treeview for, then I select to add an ActiveX control. I choose the treeview (6.0) from the list and this puts a small frame on my form covering the tabs (which tells me it isn't connected). Dragging this, I should see the tab form turn black to show it's going into that tab but it never does. Am I building these wrong? - M. Hump

1 Answers

0
votes

Answer: Make sure to select the tab first and then create the TreeView control. TreeView controls cannot be attached to a tab page by drag/drop.

If done correctly, the control will be placed on the tab page just under the tab name within the borders of the tab page. A quick test by selecting other tabs can be done to check that it attached to the right tab and only that tab.