We help IT Professionals succeed at work.

How can I create a custom menu bar?

Saleve
Saleve asked
on
1,096 Views
Last Modified: 2012-05-10
When my database opens, I disable all of the command bars.  When the user opens a report, he needs access to menu item File>Print.  How can I display this in a menu bar without showing all the other menus in the menu bar?
Comment
Watch Question

Scott McDaniel (EE MVE )Infotrakker Software
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014

Commented:
Build your own custom menubar and set that to open when your report opens.

To create a new menubar:

1) Click Tools - Customize
2) On the Toolbars tab, click New. Name your new Toolbar.
3) Now add controls and items to the bar. YOu can use the builtin commands by clicking the Commands tab and locating those commands, then drag-drop them to your menubar.

Now open your report in Design view and select your new Toolbar in the properties page. It's in the Other tab, under the Toolbar selection.

Author

Commented:
Thank you.  That works well, but it doesn't completely meet my needs.  There are two issues:

1) When the database loads it disables all built-in menus.  Therefore, selecting the custom menu in the properties page of the report isn't enough.  I believe that I will have to enable it when the report loads, otherwise it doesn't open.  (When built-in menus are enabled then the custom menu opens when the report opens.)  Would you please tell me how to do this.  

2) I would like the user to be able to do only three things 1) print the whole report, 2) select specific pages of the report to print, and 3) close the report.  The first and third of these is easy.  But how can I enable the user to print specific pages of the report without giving them the entire File menu?

Thank you again for your help!
Scott McDaniel (EE MVE )Infotrakker Software
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014

Commented:
<I believe that I will have to enable it when the report loads>

If you set the Report's Toobar property to your new toobar, you'll see that toolbar. Did you try this to see?

<But how can I enable the user to print specific pages of the report without giving them the entire File menu?>

The Print menuitem allows users to select the Pages they wish to print. This is the simplest option, it would seem. Does that not suit your needs?

Author

Commented:
Hi.  

Yes, I tried.  The custom report menu does not open when all command bars have been disabled.  Fyi, this is the code I run when the database opens:
 Dim j As Integer
    For j = 1 To CommandBars.Count
        CommandBars(j).Enabled = False
    Next

I don't have (don't know how to find) a print menu that is independent from the File menu.  There is a print command button, but that prints the entire report without letting the user chose specific pages.  Where can I find the print menu?

Thanks!
Infotrakker Software
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:

Your first suggestion works.  Thank you.

In the version of Access that I am using, 2003, page setup doesn't allow the user to pick which pages they want to print.  Perhaps a later version does.    Your point is well taken, however, that the user should select the records that they want to see before the report opens.  I always just like the option of being able to print a specific page in case there was a problem with the print, some little piece of information was changed requiring a reprint, etc.  But this isn't too important.  

Thanks again for all of your help.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
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.