Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Apr 2004
    Thanked 0 Times in 0 Posts

    TreeView (Access 97)

    I have mixed success in Filling an xTree object in a form with data from a query....

    I am able to Build the tree using the query as the recordset as in this
    first bit of code to build the tree ...
    - - - - - - - - - - - - -
    Private Sub StartTree()
    On Error GoTo ErrStartTree
    Dim DB As DATABASE, rst As Recordset, nodCurrent As Node
    Dim objTree As TreeView, strText As String, nodRoot As Node
    Dim bk As String
    Set DB = CurrentDb
    Set rst = DB.OpenRecordset("TreeQuery", dbOpenDynaset, dbReadOnly)
    - - - - - - - - -

    this only works if the query "QueryTree" has no criteria arguments or a " fixed quoted value".

    It will not work if the query contains a criteria argument such as a value of a combobox . ..

    I get an error "Too few parameters. Expected 1"

    Any suggestions? Thks

  2. #2
    Platinum Lounger
    Join Date
    Dec 2000
    Queanbeyan, New South Wales, Australia
    Thanked 0 Times in 0 Posts

    Re: TreeView (Access 97)

    Hi bmc,

    Your previous post on this didn't get lost- it was moved <A target="_blank" HREF= &view=expanded&sb=5&o=31&vc=1#Post80629>here</A>. We tend to do that sometimes when we feel that you'll get a better answer on another board. Access VBA tends to be a bit different from other flavours, so we tend to move those to Access.

    You'll see a post marked "TreeView (Access 97) (80474) was moved to the Access board "- that indicates that the post was moved.

    I'll leave this post here, just in case anyone else can help- but I'll lock this thread so that you'll only get answers in oncve place.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

Posting Permissions

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