MS Access 2007 重命名自定义组中的快捷方式以更改对象的名称
在 Access 2007 中,我创建了许多自定义组来组织单个数据库中的大量查询和表。有许多单独的子查询链接到更大的查询。在开发过程中,我发现有必要在将某些查询添加到自定义组后经常对其进行永久重命名。
但 Access 仅重命名组中的快捷方式,而不重命名实际对象。这会导致引用损坏。所以我现在必须从组中删除一个对象,重命名它,然后添加回组中。如果您有大量查询和表,这会增加更多问题。
是否有任何方法可以配置 Access 以重命名实际对象,而不仅仅是自定义组中的快捷方式?
谢谢
In Access 2007 I create a lot of custom groups to organise the large number of queries and tables in a single database. There are lots of individual sub queries that link up to larger queries. In development, I find it necessary to frequently rename some of the queries permanently after they have been added to a custom group.
But Access only renames the shortcut that is in the group and not the actual object. This causes broken references. So I now have to remove an object from the group, rename it, then add back to the group. This adds further problems if you have lots of queries and tables.
Is there any way to configure Access to rename the actual object and not just the shortcut from within a custom group?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
至少在 Access 2007 版本中您无法执行此操作。
You cannot do this in Access 2007 version, at least.
是的,这是可能的。
删除快捷方式,使该对象位于未分配的对象组中。在那里,重命名该对象。然后将对象拖回到自定义组中。
Yes, it is possible.
Delete the shortcut, so the object is located in the unassigned objects group. In there, rename the object. Then drag the object back in the customized group.
这可以在不删除任何内容的情况下完成。操作方法如下:
将导航面板中的视图类型切换为您正在使用的对象类型(查询或表)
找到实际表并重命名它(您在这里看到的所有内容都将是实际对象而不是快捷方式)
将视图类型切换回自定义
这将更改表的名称,同时保持快捷方式名称不变。我在 Access 2013 中对此进行了测试,旧的快捷方式现在将指向新的表名称。
This is possible to do without deleting anything. Here's how:
Switch the view type in the navigation panel to the type of object you're working with (queries or tables)
find the actual table and rename it (everything you see here will be actual objects and not shortcuts)
switch the view type back to Custom
This will change the name of the table while keeping the name of the shortcut in tact. I tested this in Access 2013, and the old shortcut will now point to the new table name.
遗憾的是,您无法在 Access 中执行此操作。这就是快捷方式的想法。实际上,它与 Windows 中相同(您可以重命名快捷方式,但对象本身保持不变)。
Unfortunately, you cannot do this in Access. That's the idea of shortcuts. Actually, it is the same as in Windows (you can rename the shortcut but the object itself stays intact).
对你的问题的简短回答 - 否
The short answer to your question - NO
免责声明:我自己也解决了这个问题,因此当我了解更多信息时可能会更新此内容。
在自定义视图中重命名对象的建议。
概述
自定义分组对于处理小型项目非常有用,因此您可以保留一组相关对象,例如表格并且查询紧密相连,因此可以在它们之间快速切换。
不幸的是,没有内置的 Access 文档记录器可以输出对象名称、它们所排序的自定义组以及为对象指定的自定义名称。 (这将非常有用,例如,如果需要的话,可以使用新的改进的自定义名称来实际重命名对象的“真实”名称。是的,这可能很危险,但备份可以保护您。任何人都可以添加指向任何此类代码的链接吗?)
当您将自定义命名对象拖到查询设计屏幕中时,它会以其“真实名称”而不是其自定义名称显示在那里!
因此,它很快就会变得非常混乱,尤其是当您在开发过程中想要更改基础表或查询的名称时。
您可以从自定义列表中“删除”(右键单击)对象,使其出现在默认的全部“未分配对象”下方 - 您可以在其中重命名“真实”名称,然后将其拖回到自定义组中,并在必要时使用“自定义名称”重命名。
此建议改进了上述情况,由于“未分配的对象”中可能存在大量项目,因此查找对象变得很麻烦。
提示
为了更简单,请将“未分配的对象”中的所有项目设置到一个名为“UNASSIGNED_MyCustom”的新自定义组。完成后,“未分配的对象”现在为空。这意味着您想要“删除”的任何自定义项目都将放入现在空的“未分配对象”中,从而非常容易查找和重命名并拖回您的自定义组。
Disclaimer: Working this out for myself as well, so may update this as I learn more.
A suggestion to make renaming objects while in the Custom view.
Overview
The custom grouping is useful for working on a mini-project so you can keep a group of related objects e.g. tables and queries close together so quickly flip between them.
Unfortunately there is no built in Access documentor that outputs object names, the custom groups into which they have been ordered, the custom name given to the object. (This would be very useful e.g. to use a a basis for actually renaming the 'real' name of the object with your new improved custom name if so desired. Yes dangerous it could be, but backups protect you. Can anyone add links to any such code?)
When you drag a custom named object into a Query design screen, its displayed there by its 'real name' not its custom name!
So it becomes quickly quite confusing especially when as you develop you want to change the names of the underlying table or query.
You can 'Remove' (Right click) an object from the Custom listing, causing it to appear below in the default catch-all "Unassigned Objects" - where you can rename the 'real' name and then drag it back into your custom group, and if necessary rename with a 'custom name'.
This suggestion improves the above where, due to the potentially large number of items in "Unassigned Objects" it makes it cumbersome to locate the object.
The Tip
To make it much easier, set all the items in "Unassigned Objects" to a new custom group called e.g. "UNASSIGNED_MyCustom". Once complete, "Unassigned Objects" is now empty. This means any custom items you want to 'Remove' will drop into the now empty "Unassigned Objects" making it super easy to find and rename and drag back up to your custom group.