Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Problems using Imagelist control with treeview

Avatar of Thirt
Thirt asked on
Microsoft Access
5 Comments1 Solution1571 ViewsLast Modified:
I'm not that familar with the treeview control but learning. I'm using a treecontrol to list all the master and sub projects (parent/child) for a given client. I've gotten to the point where I now need to add an image for the node. If the project is closed, I have a red X image, and if the project is open display a green check.

I would prefer not to refer to the images by filename. I would rather keep a local lookup table in the MDB front end client, as that I have control over. But I can't even get this to work refenceing the picture as a local file.

I've been using the MS help page here: http://msdn.microsoft.com/en-us/library/aa443198(VS.60).aspx

But it's confued me and I'm really starting to butcher this up. So I need some help

I would like to build up the imagelist "istatus" with the two images, and then apply it to the Nodes.add by the imagelist refernce number.

I can't get the image added to the control using the local table with dlookup. Appears to load when using the file name. But I now get an error at nodes.add when trying to apply the image. Gives me the error "Object doesn't support this property or method"

Any suggestions ?
Dim istatus As New ImageList
    
'    Set imgx = istatus.ListImages.Add(, 1, LoadPicture(DLookup("ImageObj", "tlkp_Images", "ImageID = 1")))
    Set imgx = istatus.ListImages.Add(, 2, LoadPicture("C:\PP_projectmgr\closed.bmp"))
 
'....Node refence later in the code...
Set nodParent = tvwTree.Nodes.Add(, , "a" & !fldProjectIndexNo, !fldProject, imgx(2))