MS Access 2010运行时-缺少连续形式的右键单击上下文菜单 [英] MS Access 2010 Runtime - Missing Right Mouse Click Context Menu in continuous forms
问题描述
我已经在MS Access 2003中编写了一个应用程序.我可以使用Access 2010运行该应用程序,但是当我仅使用MS Access 2010 Runtime打开同一2003应用程序时,我将无法再连续使用鼠标右键(我可以使用完整版)来按选择进行过滤或对数据进行排序等.还有其他人遇到过这种情况吗?这是Access 2010的有目的设计吗?如果是这样,有谁知道为什么右键单击内容菜单不起作用?否则-这是Runtime 2010的正常部分吗,我的应用程序有问题吗?
I have written an application in MS Access 2003. I can run this using Access 2010, however when I open the same 2003 application with the MS Access 2010 Runtime only, I can no longer use the Right Mouse Click in a continuous form (as I can with the full version) to filter by selection or to sort data etc. Has anyone else encountered this situation? Is this a purposeful design of Access 2010? If so, does anyone know why the Right-Click Content Menu is not working? Otherwise - is it a normal part of the Runtime 2010 and my application is the problem?
推荐答案
不幸的是,运行时未启用上下文菜单,但是,您可以为应用程序重新创建其中的一些菜单.
The Runtime unfortunately doesn't have context menu enabled, however, you can re-create some of it for your application.
例如,在我的系统中,我创建了一个基本的复制/剪切/粘贴上下文菜单,如下所示:
For instance, in mine, I create a basic copy/cut/paste context menu like this:
'-----------------------------------------------------------------------------'
' General Clipboard context menu, the basis for all forms '
'-----------------------------------------------------------------------------'
Public Function CreateGeneralClipBoardMenu()
On Error Resume Next
CommandBars("GeneralClipboardMenu").Delete
Dim cmb As CommandBar
Set cmb = CommandBars.Add("GeneralClipboardMenu", msoBarPopup, False, False)
With cmb
.Controls.Add msoControlButton, 21, , , True ' Cut
.Controls.Add msoControlButton, 19, , , True ' Copy
.Controls.Add msoControlButton, 22, , , True ' Paste
End With
Set cmb = Nothing
End Function
在您的应用程序启动时只需调用一次此代码,并且上下文菜单将随处可用.
Just call this code once at the start of your application and the context menu will be available everywhere.
需要列表MSDN上的msoControlButton Ids 线程的内容演示了如何类似地添加排序和筛选"选项.
The Need a list of msoControlButton Ids thread on MSDN shows how to similarly add Sorting and filter options.
这篇关于MS Access 2010运行时-缺少连续形式的右键单击上下文菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!