除了开发时如何隐藏功能区

发布于 2024-11-18 12:02:33 字数 188 浏览 1 评论 0原文

我正在使用 Access 2007 并为我父母的企业创建一个发票系统。当我在 Access 中进行开发时,我希望能够看到功能区导航以及左侧的对象导航。当我把它推出给他们使用时,我想隐藏所有这些垃圾。

有没有一种简单的方法可以作为“开发人员”输入访问数据库,为我提供所有选项,但是当最终用户打开时,他们看到的只是我在打开数据库时自动执行打开的表单?

I am using Access 2007 and creating an invoicing system for my parent's business. When I'm developing in Access, I would like to be able to see the ribbon nav, and also the object nav over on the left. When I push it out to them for their use, I would like to hide all of that junk.

Is there an easy way to enter an access DB as a "dev" giving my all of the options, but when opened by an end user, all they see are the forms that I have AutoExec'd to open when the database is opened?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时间海 2024-11-25 12:02:33

要切换导航窗格,我使用 F11。要切换功能区,请按 Ctrl+F1 --- 但这会最小化功能区而不是完全隐藏它。

如果您想对 VBA 代码执行类似操作:

'hide the navigation pane
DoCmd.SelectObject acTable, , True
DoCmd.RunCommand acCmdWindowHide

'unhide the navigation pane
DoCmd.SelectObject acTable, , True

'hide ribbon
Docmd.ShowToolBar "Ribbon",acToolBarNo

'unhide ribbon
Docmd.ShowToolBar "Ribbon",acToolBarYes

区分应用程序的开发版本和生产版本的一个简单方法是将它们放在单独的文件夹中。

If CurrentProject.Path Like "*Dev*" Then
    'do what you want for development mode
Else
    'do what you want for production mode
End If

如果这对您不起作用,还有很多替代方案。

您可以在其中存储状态、在启动时检索状态并根据状态进行调整的表。

相同的方法,但使用数据库属性而不是表。

您的代码检查以确定状态的模块变量。

这些只是一些,但如果您有动力,您可以想出更多。

To toggle the navigation pane, I use F11. To toggle the ribbon, Ctrl+F1 --- but that minimizes the ribbon rather than hides it completely.

If you want to do similar with VBA code:

'hide the navigation pane
DoCmd.SelectObject acTable, , True
DoCmd.RunCommand acCmdWindowHide

'unhide the navigation pane
DoCmd.SelectObject acTable, , True

'hide ribbon
Docmd.ShowToolBar "Ribbon",acToolBarNo

'unhide ribbon
Docmd.ShowToolBar "Ribbon",acToolBarYes

An easy way to distinguish between the development and production versions of your application is to place them in separate folders.

If CurrentProject.Path Like "*Dev*" Then
    'do what you want for development mode
Else
    'do what you want for production mode
End If

If that doesn't work for you, there are many alternatives.

A table where you store the status, retrieve the status at startup, and do your adjustments based on the status.

Same approach, but using a database property instead of a table.

A module variable which your code checks to determine the status.

Those are a few, but you can come up with plenty more if you're motivated.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文