We help IT Professionals succeed at work.

CREATE MENU

bokikg
bokikg asked
on
438 Views
Last Modified: 2008-02-20
how to create any menu item from code...
not sub menu ....
for example how to create menu item called FILE in next structure with next sub menus from code...


FILE
--Open
--Save
--
--Close


Please provide some samples and examples for this.

Thanks.
Comment
Watch Question

'use menueditor create a submenu of mnuFile
caption = "-"
name = "mnuFileSub"
index = 0

Sub CreateSubMenus()
    mnuFileSub(0).Visible = True
    While mnuFileSub.Count > 1
        Unload mnuFileSub(mnuFileSub.Count - 1)
    Wend
    ' create submenus as you wish
    Load mnuFileSub(1)
    mnuFileSub(1).Caption = "&Open"
    mnuFileSub(1).Visible = True
    '...
    mnuFileSub(0).Visible = (mnuFileSub.Count = 1)
End Sub

Author

Commented:
you didn't figer out ... how to make menu item called FILE not submenu... i know to that.... how to create parent menu item not submenu item from code....
so sorry. Now I'm try exactly way, need some time...
Why dont you create the menu whit the editor, make it invisible, and when you want to show it, make it visible ?

Or explain better your wish..
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
supper man thanks a lot...

Commented:
Ruchi,
I saw your code during my EE search engine for this topic. I tried to implement your codes as suggested but got numerous errors while trying it. I know it's about 5 years you did this - I am sure you probably have a better way of handling the MENU creation in Access. I'll definitely appreciate it if you could take a look at my new post (see the link below) on the subject matter.

My post was done very recently and the question is very much similar to the one you handled here on February 25, 2000 I will appreciate it if you could drop me a line by clicking on my userid which will take you to my profile. Below is the link to my new post.

https://www.experts-exchange.com/Databases/MS_Access/Q_21373657.html
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.