Link to home
Start Free TrialLog in
Avatar of mlcktmguy
mlcktmguyFlag for United States of America

asked on

Print Button on custom menu

Using macros I defined a custom Menu Bar for my app.  I then defined an AutoExec Macro that has these three lines:
SetValue          Item:[Application].[MenuBar]  Expression:"MT_MainMenu"
RunCommand   Command:WindowHide
Openform         Form:frmtree      View:Form      WindowMode: Normal

The result is almost exactly what I wanted.  When the app is opened the user is presented with 'frmTree' which they can use to navigate thru the app.  Also, my menu bar appears at the top fo each form and gives them access to other functions not contained in frmTree.  

Now that I have suppressed all of the system menu's I would like to add one of the 'system' options to my menu.  That function is 'Print'.  I send most of my reports to the screen to be previewed before printing.  However, now that I have defined my own menu's, the 'Print' is no longer available.  How can I add print to one of my custom menu's.  I created these menu's with Macro's using the 'Addmenu' option.  They were not created using the toolbar/menu designer.  I don't see any way to include system options in these menu's. How can I do this?
Avatar of puppydogbuddy

This link has a step by step how to add items to a custom menubar.  Just scroll down ubtil you see the relevant topics, starting with "Adding Custom Menus".  All you need to do is choose the Customize option from the Tools menu. Access displays the Customize dialog box..........
Avatar of mlcktmguy


I am familiar with the Menu Builder that you refer to.  However, These menu's were created using Macro's, not the Tools, Cusotmize, etc...
Even if you added the custom menubar to the application via a macro, you added items to the menubar by using the command menu (tools>customize,etc), didn't you?  If not, can you give me an example of an item you added to the menubar via a macro.  You would add a new item the same way...
I have a Macro called 'Open_from_Menu',  with about twenty entries for all my menu options,  The lines look like this:
MacroName: Lenders     Action: Openform,  then below I specify'frmLenders'.

I then have separate Macros for each Heading in the eventual menu bar.  One of these macros is called 'MT_Maint_Menu'.  I have all my file maintenence tasks in this one.  An example line looks like:

MacroName: Lenders     Action:RunMacro, then below I specify the Macro to be run as 'open_from_menu.Lenders'

My last macro which actually creates the menu bar is called 'MT_MainMenu' and includes a line for each tab in the menu bar.  A line in this macro looks like:
Action: AddMenu,   then below I specify 'Mainenance' as the MenuName (this is the name that appears as the heading in the menu bar) and MT_Maint_Menu as the item.
I have one of these lines for each each heading in the Menu Bar.

I understand how I owuld add the 'Printer' function if using the Tools, Customize, etc.. technique.  But this app already ahs an extensive menu structrue done in Macro's that I don't want to have to re-create.  

My question stands:  How can I add a 'system' (for example: Print) option to menu's created in the manor.

Avatar of puppydogbuddy

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you very much
Glad I could help.  Thanks for the points and grade.