[AccessD] Drew - TreeView help again, please

Tina Norris Fields tinanfields at torchlake.com
Sat Apr 25 08:42:33 CDT 2009


Drew and Gustav,

Drew - yes Mirosoft ActiveX Data Objects 2.5 is available and I have now 
referenced it.
Gustav - I did have a misspelling, which I have now fixed.

Both - now the error I receive is much farther down the code.  It is in 
the section for clicking any nodes - using my field and table names, it 
looks like this (line numbers added for ease in discussing):
-----------------------------------
 1-  Set rs = New ADODB.Recordset
 2-    ' Click the nodes to be selected
 3-    strSQL = "SELECT tblAffiliateSkillsInventory.SkillsCode, 
tblAffiliateSkillsInventory.Level FROM tblAffiliateSkillsInventory WHERE 
MEMID=" & intMemID
 4-    rs.Open strSQL, CurrentProject.Connection, adOpenKeyset, 
adLockReadOnly
 5-    If rs.EOF = False Then rs.MoveFirst
 6-    Do Until rs.EOF = True
 7-        tvw.Nodes("ID:" & rs.Fields(0).Value & ":" & 
rs.Fields(1).Value).Checked = True
 8-        tvw.Nodes("ID:" & rs.Fields(0).Value).Checked = True
 9-        ' Expand the node to see the level
10-        tvw.Nodes("ID:" & rs.Fields(0).Value).Expanded = True
11-        rs.MoveNext
12-    Loop
----------------------------------

The line that gives the error is line 7.  The run-time error is 35601 
Element not found.  The tool-tip shows
tvw.Nodes(ID:" & rs.Fields(0).Value & ":" & rs.Fields...<element not found>

I'm wondering what to do next.  Thanks for all your help.

T

Drew Wutka wrote:
> Hmmm, is Microsoft ActiveX Data Objects 2.5 available?
>
> Drew
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tina Norris
> Fields
> Sent: Friday, April 24, 2009 8:40 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Drew - TreeView help again, please
>
> Hi Drew,
>
> I have these references checked, in this order
> :
> Visual Basic For Applications
> Microsoft Access 11.0 Object Library
> OLE Automation
> Microsoft DAO 3.6 Object Library
> Microsoft ActiveX Data Objects 2.1 Library
> Microsoft Windows Common Controls 6.0 (SP4)
> Microsoft Visual Basic for Applications Extensibility 5.3
> Microsoft ADO Ext. 2.8 for DDL and Security
>
> Am I missing something here?  Thanks,
> T
>
>
> Drew Wutka wrote:
>   
>> Do you have the ADO reference selected?
>>
>> Drew
>>
>> -----Original Message-----
>> From: accessd-bounces at databaseadvisors.com
>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tina Norris
>> Fields
>> Sent: Thursday, April 23, 2009 10:44 AM
>> To: Access Developers discussion and problem solving
>> Subject: [AccessD] Drew - TreeView help again, please
>>
>> Hi Drew,
>>
>> First of all, thank you very much for getting me started using the 
>> TreeView control.  I can see that this will be very useful - but, I am
>>     
>
>   
>> still struggling to get my brain around it.
>>
>> I have very carefully worked through your code and made the name 
>> adjustments I have to make to match up to my existing tables and 
>> fields.  There are still a couple of places where I scratch my head
>>     
> and 
>   
>> say "huh?" but for the most part I am finally understanding what you 
>> have shared with me.  Thanks.
>>
>> Now, I have run into a runtime error that I don't understand and I
>>     
> don't
>   
>> know how to handle.  When I select a volunteer from my combo 
>> (cboVolunteers), I get this error message:
>> ---------------------------------------
>> Run-time error '-2147217904(80040e10)':
>> No value given for one or more required parameters.
>> ----------------------------------------
>>
>> When I click the Debug button, the line of code that is highlighted
>>     
> is:
>   
> ------------------------------------------------------------------------
>   
>> -------
>> rs.Open strSQL, CurrentProject.Connection, adOpenKeyset,
>>     
> adLockReadOnly
>   
> ------------------------------------------------------------------------
>   
>> -------
>>
>> I have no idea at this point what is wrong.  Can you help me figure it
>> out?
>>
>> Thanks,
>> Tina
>>   
>>     



More information about the AccessD mailing list