Access Options

T

Tirelle

I am almost finished building an application in Access 2007. I am now setting
the security and I need deal with the "Office Menu", specifically the "Access
Options" button. All I need to do is 'disable it' or 'hide it' so normal
users do not have access. At first I tried to just disable full menus, but I
would like to keep the contextual tabs such as print preview. Disabling full
menus removed that. Is there a way to accomplish this or any other
suggestion to deal with this problem?

Thanks

Tirelle
 
S

Sky

I am almost finished building an application in Access 2007. I am now setting
the security and I need deal with the "Office Menu", specifically the "Access
Options" button. All I need to do is 'disable it' or 'hide it' so normal
users do not have access. At first I tried to just disable full menus, but I
would like to keep the contextual tabs such as print preview. Disabling full
menus removed that. Is there a way to accomplish this or any other
suggestion to deal with this problem?

Thanks

Tirelle

You can disable the Access Options (grey it out) using:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
onLoad="OnRibbonLoadMain">
<commands>
<command idMso="ApplicationOptionsDialog" enabled="false"/>
</commands>

Or you can override the options with your own callback function using:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
onLoad="OnRibbonLoadMain">
<commands>
<command idMso="ApplicationOptionsDialog" enabled="true"
onAction="MyCallBackFunction"/>
</commands>

- Steve
 
T

Tirelle

Thanks Steve!!!
I have the excel file from Microsoft.com that has most of idMso but it did't
have that one. You know of a more complete one? Also, do you have any idea
how I can get to actual control id's (for id) to use when creating shortcut
menus?
 
S

Sky

There are a number of references for ribbon development at:
http://msdn.microsoft.com/en-us/office/aa905530.aspx

As far as shortcut menus, do you mean the regular commandbars, toolbars
and shortcut menus that are also available in Access 2003 and earlier?
If so, those have an object model in VBA so you can determine id's from
code in the immediate window, such as:

?CommandBars(1).Controls(1).Controls(1).Caption
&New...
?CommandBars("Menu Bar").Controls("File").Controls("New...").Caption
&New...
?CommandBars("Menu Bar").Controls("File").Controls("New...").Id
2936
?CommandBars("Menu Bar").Controls("File").Controls("New...").FaceId
2936

You can also write something to list all of the commandbar names and
controls with ids. I don't know if there is a full list ready-made.

- Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top