D
dantebus
I have a form that contains a Combobox and a TabControl with two tabs on it.
The combobox is used to select which record to populate the form with.
Tab A contains some general textboxes with RecordSources, and Tab B contains
a Treeview Control that is populated when the user changes the selected
record with the combo box. When I had all of this stuff on the same form I
didn't have any problems changing records, however when I had the TreeView on
a seperate tab, it sometimes produces the following error:
---
Run-time error '-2147417848 (80010108)':
Method 'Add' of Inodes failed.
---
And it proceeds to highlight the following code line in my populate method:
tvwControl.Nodes.Add , , "_" & rs(0), rs(1)
This is the very first item that is added to the TreeView control, the
control has just been cleared, rs(0) contains the number 1 and rs(1) contains
the correct text to be added to the tvwControl. The thing that makes this
really weird is, when I click "Debug", and then hit the play button, the list
populates fine half of the time, and the other half of the time the list has
one or two nodes with garbage text (random ascii characters, or all question
marks).
Another weird thing is, this error only happens when I switch from Tab A, to
Tab B, and then back to Tab A before changing the value in the combo box. If
I'm already on Tab A and I've never been to Tab B it populates fine
(including on form_load).
This is all very confusing
The combobox is used to select which record to populate the form with.
Tab A contains some general textboxes with RecordSources, and Tab B contains
a Treeview Control that is populated when the user changes the selected
record with the combo box. When I had all of this stuff on the same form I
didn't have any problems changing records, however when I had the TreeView on
a seperate tab, it sometimes produces the following error:
---
Run-time error '-2147417848 (80010108)':
Method 'Add' of Inodes failed.
---
And it proceeds to highlight the following code line in my populate method:
tvwControl.Nodes.Add , , "_" & rs(0), rs(1)
This is the very first item that is added to the TreeView control, the
control has just been cleared, rs(0) contains the number 1 and rs(1) contains
the correct text to be added to the tvwControl. The thing that makes this
really weird is, when I click "Debug", and then hit the play button, the list
populates fine half of the time, and the other half of the time the list has
one or two nodes with garbage text (random ascii characters, or all question
marks).
Another weird thing is, this error only happens when I switch from Tab A, to
Tab B, and then back to Tab A before changing the value in the combo box. If
I'm already on Tab A and I've never been to Tab B it populates fine
(including on form_load).
This is all very confusing