Avatar of Stephen Noble
Stephen NobleFlag for United States of America

asked on 

Convert tree view to Late Binding using Microsoft Windows Common Controls 6.0 (SP6)

I have a tree view using reference Microsoft Windows Common Controls 6.0 (SP6). I want to avoid using the early reference and convert to late binding.

I have 3 sub routines (attached) using this reference. Is it possible to convert this to late binding?
Sub-LoadTreeView.docx
DatabasesMicrosoft AccessVBA

Avatar of undefined
Last Comment
Scott McDaniel (EE MVE )
SOLUTION
Avatar of Daniel Pineault
Daniel Pineault

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
I'd agree with Daniel.

Also, the biggest reason to use Late Binding is to avoid reference issues. Since you MUST ensure that the control is available on the target machine there's little reason to use Late Binding for something of this nature.
Avatar of Stephen Noble
Stephen Noble
Flag of United States of America image

ASKER

Alright... got the code attached now. Will review  https://www.jkp-ads.com/articles/treeview.asp. Still would be interested in how I would convert this code though. It is pretty simple/clean.

I am wanting to change to late binding on these as I am getting 'random' errors in my accde on other user's machines. The files are in a trusted location, I have imported all objects into a new accdb and complied with no errors. These has to be something in reference to these additional references I had to pull in.

I use DAO and normally use Microsoft DAO 3.6 Object library but using Microsoft Office 15.0 Access Database engine object library as this was by default and my code appears to be working. Any preference on which to use?
Avatar of Daniel Pineault
Daniel Pineault

Anything 2007+ should use Microsoft Office XX.X Access Database engine object library
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
ASKER CERTIFIED SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of Stephen Noble
Stephen Noble
Flag of United States of America image

ASKER

Noted on late binding using the Active X. Also thanks for the optional tree view solution.

I am currently experiencing 'random' errors in some user machines when I convert to accde. I have created another application on users machines with no errors. I am suspecting it is my tree view that is causing this 'error'.
ActiveX controls are always suspect in situations like this. When I have to use them, I always create an installer that includes the controls needed, and allow that installer to determine if I need them or not.
Avatar of Stephen Noble
Stephen Noble
Flag of United States of America image

ASKER

Alright I was able to integrate his solution to replace the ActiveX tree I was using.

The last bit of code I need to figure out is how I can select a node in the tree if i pass a Key value???

I have been hacking around but not finding anything.
Hi Stephen,

You'd be better off asking this as a new question
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo