Hi,
I have a form that contains a treeview. The treeview has 3 levels, and I have buttons on the form that will rearrange the levels of the treeview if the user wants to. The treeview is populated with about 10,000 records on open... it doesn't take that long. However, when the user clicks a button to reorder the treeview, it clears the nodes and loops through the load_tree function (just as it does when the form loads), but this time is fed different parameters. This takes A LONG TIME, and I can see the treeview flashing as if it is redrawing itself each time it adds a node. I tried doing .visible = false, and then populating the treview and doing .visible = true at the end, but with the treeview set to not visible, access throws a memory exception error at the add node line.
So, I'd like to know. Is there a way to avoid redrawing the treeview everytime it adds a node? I think this will cause it to function just like it does on form open, which is much quicker.
Thanks
I have a form that contains a treeview. The treeview has 3 levels, and I have buttons on the form that will rearrange the levels of the treeview if the user wants to. The treeview is populated with about 10,000 records on open... it doesn't take that long. However, when the user clicks a button to reorder the treeview, it clears the nodes and loops through the load_tree function (just as it does when the form loads), but this time is fed different parameters. This takes A LONG TIME, and I can see the treeview flashing as if it is redrawing itself each time it adds a node. I tried doing .visible = false, and then populating the treview and doing .visible = true at the end, but with the treeview set to not visible, access throws a memory exception error at the add node line.
Code:
Set nodCurrent = objTree.Nodes.Add(, , , Nz(xVar1, "-"))
Thanks