Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Method 'Add' of object 'INodes' failed

Posted on 2011-02-21
2
Medium Priority
?
839 Views
Last Modified: 2012-08-13
Encountered a problem this morning that I thought I'd post here and add to the solutions.

I was working with an application that has been working fine for over a year now, but was tweaking a few things and encountered an error message of:

-2147417848
Method 'Add' of object 'INodes' failed

I had made a number of what I believed were trivial changes to the application and could not figure out what was causing this to occur.  I only found one solution on EE with this subject and the solution for it did not work for me, so I started searching Google and found a couple of posts that each addressed the same problem, that they were getting this message when attempting to add the first node to a treeview control.

In both cases, the solution was to ensure that the treeview control was visible at the time of the addition.  

It turns out that one of the things I had done was to remark out a line of code (me.visible = true) that made the form visible in the Open event.  I had done this because I wanted to be able to open the form in a hidden mode while the user has the Splash screen displayed on their screen.

In the forms Load event, I was calling a subroutine and passing it the treeview object (tvw) , but it was not being recognized.  When I added an error handler

    If Err.Number = -2147417848 Then
        Set tvw = Forms("frm_Activities").tree_Activities.Object
        Resume
    Else

 for that error number, it seemed to work, but when the treeview appeared, there was an extra node at the top of the tree with no text.   tree with extra node
When I checked to see how many nodes were in the tree, there were 8, which is the correct number once the FY10 and FY11 nodes are expanded.  When I clicked on any of the other nodes, they reacted as expected, but when I clicked on the first node (the one with the green dot) it locked up Access and I had to use the Task Manager to shut down Access.

Resolution for this problem was to ensure that the form with the treeview was visible when the first node was added.

0
Comment
Question by:Dale Fye
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 48

Accepted Solution

by:
Dale Fye earned 0 total points
ID: 34945118
Already found the solution, but wanted to add this to the "Solutions" for others to see.
0
 
LVL 48

Author Closing Comment

by:Dale Fye
ID: 34945125
already had the solution
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question