Treeview control in Access 2007 - Tip!

M

Minton M

Here we are ending the first decade of the new millennium, and Access
still doesn't have a native treeview control. *Sigh* Anyway, as always
I get coerced into using a treeview control and always find a stack of
bugs that cause GPFs all over the place.

Interestingly, I found the following which will hopefully help anyone
undertaking similarly (awful) tasks:

1. If you set any references to the treeview (dim tvMain as Treeview,
etc), make sure you set them to nothing when you're done. Religiously.

2. Don't reference the treeview from either general declarations or
maintain a reference from other classes/modules. Rather, pass a
reference from the calling subs/functions on your forms.

3. If the treeview maintains runtime contents in design mode, you're
going to crash. Something has retained a reference to the control and
your only hope is to delete the control and re-add.

I managed to actually make the damn thing stable by following these
two hard-to-follow rules. Getting drag and drop to work reliably has a
snowball's chance in hell of course. Anyway, those are my two cents.
If anyone else has a decent tips (or has written a free, stable in-
Access replacement - imagine that), please reply.

Yours, GPF'd up the wazoo,
James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top