Tree Style Form menu

gstylianou

Registered User.
Local time
Today, 06:24
Joined
Dec 16, 2013
Messages
359
Dear friends,

I have prepared (with the help of tutorials video from microsoft) a form that contains a menu Tree Style. I try if I choose anything on the menu to be able to run a command. For example, if I select the "Add Customer" to be able to open the related form. Unfortunately I' m not in expert in vba so to be able to do the conversion on the code and would like your help

Thank you very much
 

Attachments

I believe you use the treeview nodeclick event and reference the treeview selecteditem property to identify which node has been selected, so you code would be something like


Code:
 Private Sub treeReqs_NodeClick(ByVal Node As Object)
  
     docmd.openform treeReqs.SelectedItem
  
 End Sub
 
CJ LONDON Thank you for your information but,

I tried to find the nod Click Events but...i cannot..! On form design view and specifically on treeReqs design, there is only the attached photo events..

Can you please try to modified my example?

I thing i must find a way on Event Click to refer to the form which i want and not on menu name because menu names are different with the forms names...

Please, i need your help

Thanks in advance
 

Attachments

  • Picture1.png
    Picture1.png
    8.4 KB · Views: 239
it doesn't show in the property window (many properties don't for this and other types of controls)

If you don't have any VBA code for that form, click on any event in that window and open the VBA window, otherwise go to Database tools>visual basic and select the form module. If you have gone the first route, delete the created event as it is not required, it just gets you to the right place.

At the top of the vba window, select the name of your treeview control in the dropdown to the left, then NodeClick from the right dropdown menu
 
Dear Grumm,

I cannot find the reference C:\Windows\System32\MSComCtl.ocx

Note: i'm using windows 10 and access 2016 version.

What can i do?

Thanks
 
Last edited:

Users who are viewing this thread

Back
Top Bottom