>If this code is in the Form.Activate() you need to take steps to ensure that is only runs once - otherwise it will attempt to add the nodes to the tree again.
>
>Yes first treview works fine. Every thing shows ok on its place. Second time when FORM get ACTIVATE evnets then error message appears
>
>What is wrong?
\
Add a form's property, say, lFirstTime, set it to true
Change your Activate to
if thisform.lFirstTime
thisform.PopulateTriewview()
thisform.lFirstTime = .f.
endif
If it's not broken, fix it until it is.
My Blog