I while ago I made a post saying that I couldn’t get the treeview working in Access 2013. Mr Jan Karel Pieterse was kind enough to drop by and leave a remark saying that the treeview should work. So I decided to go back and give it a another try.
And this is where it did start to look a bit weird to me. My Windows 8 with Office 365 version of access 2013, apparantly doesn’t come with mscomctl.ocx installed. Now that in itself is ok, but the reason I actually never checked to see if it was installed is 2 fold:
MsComCtl.ocx have been on included on all installations I have worked on so far, from office 2000 to office 2010 in windows xp to windows 7.
Within Access one of the things I tried was removing the treeview control, and adding back a “new” one. The treeview control was available from the dropdown but apparantly the required file was missing? I don’t know to be honest, I don’t dabble much in such system files. But since I could select the treeview control from the “Insert ActiveX control”, I never thought to check if it was actually installed.
Anyway, if you are like me, you will poke and prod, trying different solutions, and when it finally works, you end up wondering which of the many cogwheels turned that actually had the desired effect, and whether it was just a single cogwheel or the combination of several. Either way, I will list what I did, without the knowledge of which item finally fixed it.
Copied MsComCtl.ocx from my Windows 7 computer with Office 2010. Placed in C:\Windows\SysWow64 folder, AND c:\Windows\System32 folder
Decompiled, and recompiled my Access application.
Deleted treeview control from form, and added a “new” treeview control.
With the above steps it seems to have worked, and I now have normal treeview operation. Most of these steps were actually done over several days, and initially my batch file for registering the activex control didn’t work (due to admin privileges) but I didn’t notice that, and had actually given up.
It is possible to use a treeview in Access2013, but you have to take some steps to distribute the activeX control, and have admin privileges to register it. So its certainly way more cumbersome now than earlier.
Please take note of Timc’s reply below, as it comes with some detailed and excellent instructions.
Please take note of the suggestion on reference fix found here: