Results 1 to 4 of 4
  1. #1
    Hack is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    3

    Responding To Clicks On Treeview Nodes

    I've managed to correctly populate a treeview control on a Access form. Now I need to tie VBA code (in modules) to individual nodes. In other words, when a specific node is clicked, a specific sub needs to be executed.



    However, I see no "On Click" event.....I see an "On Updated" "On Enter" "On Exit" "On Got Focus" "On Lost Focus" event, but nothing that corresponds to a mouse click.

    How to I get SubA to execute when treeview.node("SubA") is clicked?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Google: Access VBA treeview events

    Here is one http://stackoverflow.com/questions/9...-after-right-m
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    There is a lot of treeview info at this site
    http://mymsaccessblog.blogspot.ca/20...w-example.html

    You may have to search a bit and do some trial and error to get to the detail you need.

    Good luck with your project.

  4. #4
    Hack is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    3
    Quote Originally Posted by June7 View Post
    Google: Access VBA treeview events

    Here is one http://stackoverflow.com/questions/9...-after-right-m
    The code in there works, and it is what I would have used in VB6. I wasn't aware you could do that in Access VBA. In fact, I didn't even know the treeview had all those events. The only events I thought I had at my disposal were those on the property sheet.

    Click image for larger version. 

Name:	TV_PropertySheet.png 
Views:	13 
Size:	11.0 KB 
ID:	7135

    Thanks
    Attached Thumbnails Attached Thumbnails TV_PropertySheet.png  

Please reply to this thread with any new information or opinions.

Similar Threads

  1. How to not add Record if User clicks a BUTTON
    By taimysho0 in forum Programming
    Replies: 7
    Last Post: 12-06-2011, 10:49 AM
  2. Access Not Responding
    By Phoenyxsgirl in forum Access
    Replies: 11
    Last Post: 11-25-2011, 11:40 AM
  3. Query Not Responding
    By Lady_Jane in forum Queries
    Replies: 9
    Last Post: 11-09-2010, 01:27 PM
  4. Access Query Not Responding
    By sunharepal in forum Programming
    Replies: 4
    Last Post: 10-22-2010, 10:39 AM
  5. Automated Email Reports - monthly no clicks
    By Bamber in forum Reports
    Replies: 1
    Last Post: 05-12-2010, 12:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums