Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    18

    Unanswered: in Access TreeView doesnt support Add method??

    In Access 2002 Application when we are trying to add node to treeview in following fashion it gives following error can anybody tell me how to get rifd of it maintaing same code or minor change

    Object Doesnt Support this method or property Err No 438

    Here tvw is Treeview Control called from another Procedure in form

    Following is code in which

    Set nNode = tvw.Nodes.Add gives error Pls help me out ! and I will be really thankful to u!

    Public Function PopulateContactTree(bExpand As Boolean, _
    cmdExpand As Control, _
    tvw As Control, _
    sTable As String, _
    nSchemeAdvisor As Integer, _
    nSchemeAdvisorId As Long)


    Dim nNode As Node

    Set nNode = tvw.Nodes.Add(, , "Location" & Str(rs!LocationId), _
    rs!Address1 & " " & IIf(IsNull(rs!Address2), " ", rs!Address2) & " " & rs!Town & " " & rs!County & " " & rs!Postcode & " " & IIf(IsNull(rs!LocationPhone), " ", rs!LocationPhone))

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465

    Re: in Access TreeView doesnt support Add method??

    Make this two change and probe it:

    Public Function PopulateContactTree(bExpand As Boolean, _
    cmdExpand As Control, _
    tvw As TreeView, _ <-------------------
    sTable As String, _
    nSchemeAdvisor As Integer, _
    nSchemeAdvisorId As Long)


    Dim nNode As Node

    Set tvw = Me!ActiveXCtl0.Object <----- your ActiveX TreeView Control

    Set nNode = tvw.Nodes.Add(, , "Location" & Str(rs!LocationId), _
    rs!Address1 & " " & IIf(IsNull(rs!Address2), " ", rs!Address2) & " " & rs!Town & " " & rs!County & " " & rs!Postcode & " " & IIf(IsNull(rs!LocationPhone), " ", rs!LocationPhone)) [/SIZE][/QUOTE]
    Saludos
    Norberto

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •