1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Access 2000: Event Procedures

Discussion in 'Business Applications' started by Guy, Sep 14, 2001.

Thread Status:
Not open for further replies.
Advertisement
  1. Guy

    Guy Thread Starter

    Joined:
    Feb 19, 1999
    Messages:
    260
    I have a form that I added The Microsoft TreeView Control to. I have my tree and I want to add the "NodeClick" event procedure but everytime I try to add it (in code) I get errors on ALL my event procedures.

    I am guessing that I am missing a step and cannot just add the code directly like this:
    Code:
    Private Sub MyTree_NodeClick(Node as Node)
    End Sub
    When I add other events to this control using the properties box they work fine.

    Can someone tell me what I am doing wrong?

    Thanks,
    Guy
     
  2. downwitchyobadself

    downwitchyobadself

    Joined:
    Oct 13, 2000
    Messages:
    941
    I don't know this control, might take me a day or two to take a look at how it works. Have you explicitly added the reference in your code? Tools > References from the VBA editor.

    Did you write the code, or did you go through the object's property sheet? At first glance, I might take the word "Node" out of the Sub name.

    I'll look at it and get back to you within the next week.
     
  3. Guy

    Guy Thread Starter

    Joined:
    Feb 19, 1999
    Messages:
    260
    Explicity Added? Yes

    Yes I did simply type this in because there is no option in the property sheet to add this event BUT in the object browser, this event is listed.

    I go to work only on thursdays and fridays now because of school so there is no huge hurry.

    Thanks again,
    - Guy
     
  4. downwitchyobadself

    downwitchyobadself

    Joined:
    Oct 13, 2000
    Messages:
    941
    ...I must confess I have no idea what this is, what it's for, or how it oughta Go. So.

    That being said, I would assume, as is the case with any class object, that you have to refer to it through the correct class order. If I could figure out what that was, I'd let you know.

    What is this control for, anyway? I get a blank white space... :eek:
     
  5. Guy

    Guy Thread Starter

    Joined:
    Feb 19, 1999
    Messages:
    260
  6. downwitchyobadself

    downwitchyobadself

    Joined:
    Oct 13, 2000
    Messages:
    941
    I got the click event to do some stuff, but though I now see how the control is meant to work, the (non-existent) help is so unforthcoming that I have no idea how to make the events go on this baby. Your examples are nice for VB or C, but VBA doesn't of course use the same object model. Da noi-ve a some people!

    I'll have a look at my dev handbooks at home and see if the gurus can shed some light, but if not, I'm out of ideas.
     
  7. Guy

    Guy Thread Starter

    Joined:
    Feb 19, 1999
    Messages:
    260
    Solved. I just ended up using MyTree_Click().
     
  8. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/53347

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice