Treeview Control (v6.0) MSCtrlLib

G

gllincoln

Hi folks,

Using the Web treeview control, or the Treeview control from VB6, we have a
nodeclick event.

Using ActiveX Treeview Control v6.0 in Access 2007, I have Enter, Exit, Got
Focus & Lost Focus listed in the property sheet of the control. I tried to
create click event code using the same declaration that works in ASP but no
joy - Access 2007 compiler hangs up on it, starts throwing messages about
the Mouse over event, errors in Form Load. Remove the click event
declaration and all is back to normal. I'm not having any trouble populating
the nodes but that's not much joy - I want the user to be able to click on a
node and bring up the associated record in the form.

I'm probably over-looking something obvious here - but for the moment I seem
to be stuck.

Thanks for your consideration,
Gordon
 
D

Dale Fye

Have you tried going to the VB Editor, selecting your control from the combo
and then selecting the events associated with that control? The list of
available events is much longer than what is displayed in the properties
dialog in the form design view.

HTH
Dale
 
A

Arvin Meyer [MVP]

There is a NodeClick event in the ActiveX TreeView control as well. In fact,
that's the event that you must use. It's just not visible from the property
sheet. After placing the control on the form and making sure that a
reference is set in the code window, scroll down the combo on the left side
of the code window and choose the TreeView Control. Now scroll down the
right side combobox and choose NodeClick. Write your code Ta dah!
 
G

gllincoln

Thank you Dale -

I went brain dead on this one, was declaring it wrong; trying to declare the
event myTree_NodeClick (ByVal Node as Node), instead of ... as Object. I
need my hand held by the IDE - and my event procedures precut for me.

Gordon
 
G

gllincoln

Thank you Arvin,

As I remarked to Dale - I was declaring the event wrong, so, (of course) the
compiler wasn't giving me any love. As soon as I read your posts, and used
the combo boxes in the VBA window, everything popped into place.

Thanks again,
Gordon
 

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