Disabling the Ribbon Bar Except for Reports (Print Preview) In MS-Access

痴心易碎 提交于 2019-12-12 01:36:55

问题


I have a MS-Access 2007 client using a MS-Access 2003 MDB frontend and backend files.

Disabling the ribbon bar shuts out some unwanted behavior (such as navigating records... even though I have 'Record Selector' set to false, it still persists in the Ribbon bar), but when I do this, then the printing options are lost when in the print preview mode of a report. Because of this, no one can actually print.

Is there a way around this?


回答1:


I had the exact same problem. I created a custom shortcut menu and added the print command to this. I then set the Shortcut Menu Bar property on the report to this menu bar.

The following link shows how to create a custom shortcut menu in Access 2003

http://www.vb123.com/toolshed/05_map/ch07_rightclickmenu.htm




回答2:


In Access 2010, to hide the ribbon, office button, and all that stuff, it one line of code in VBA:

DoCmd.ShowToolbar "Ribbon", acToolbarNo

Unfortunately, above does not work in 2007 (it a new feature for access 2010).

In 2007, just build a custom ribbon that hides most everything (specify it at the application level).

Then, for reports, you need a custom ribbon anyway if you going to deploy using runtime.

I have a sample ribbons designed just for this purpose. Note that you can thus have a nice custom ribbon show just for reports. You have to specify the custom ribbon in the "other" tab of the reports property sheet, and you not even need code to have the ribbon show).

What might be an slight issue is that you likely want the ribbon minimized for all running except for reports where I prefer the ribbon maxed. I have a sample here you can download that does this for you:

Access 2007 Hidden interface example - click here Access 2007 Hidden interface example - click here

I also have a few other ribbon examples, and one with a save as pdf and email as PDF in that ribbon, you can find that here also: http://www.members.shaw.ca/AlbertKallal/msaccess/DownLoad.htm



来源:https://stackoverflow.com/questions/3442894/disabling-the-ribbon-bar-except-for-reports-print-preview-in-ms-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!