TreeView NodeClick (VBA): Throwing Mysterious Error

P

(PeteCresswell)

I tried posting this in microsoft.public.activex.controls,
but no luck.

Upon reflection, it seems better suited to .access because
it seems to be something about how MS Access VBA handles
a certain type of error.
---------------------------------------------------------

This error starts popping every so often following changes to
various VBA routines (not to NodeClick, however) in the same
form.

Something about "The expression NodeClick...."
Screen snap at: http://tinyurl.com/2pmbne

I'll revert to the prior version, key in the same changes, and
all will be well.

It does not trigger my error trapping, which looks for Err<>0.

The VBA code always compiles, and I compact/repair several times
per day while developing.

Only theory I can come up with is that something on the form is
borderline corrupt.

But why does the VBA code compile and Err=0?

Can anybody shed some light?
 
A

Arvin Meyer [MVP]

Hi Pete,

Two possibilities I can think of.

1. The TreeView which uses comctl32.ocx is definitely version specific. I
install (actually copy the file and register it) to either a network
location or more usually the same directory as my application.

2. The TreeView is also case sensitive. If the data doesn't match the case,
the moment you click on a case mismatched node, it freaks out and if you
have break on unhandled errors checked it can show you your code. The error
must be fixed in the data.
 
P

(PeteCresswell)

Per Arvin Meyer [MVP]:
and if you
have break on unhandled errors checked it can show you your code.

That's one thing that puzzles me. I always have
BreakOnUnhandledErrors=True, but it still pops that dialog
instead of falling into my error trap or breaking into the code.
 

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