Hide Access Options - ms-access

I have noticed that even though when you disable the “Use Access Special Keys”, disable the “Display Navigation Pane”, and disable the ribbon menus, you can easily access the “Access Options” go to the current Database area, and re-enable all these options.
Is there a way to completely hide the “Current Database” option in Access 2007 and 2010?

In MS Access 2007 and MS Access 2010, rather than setting options to control a user's access to the application, it is possible to control the contents of the "Backstage". All images and instructions apply to Access 2010, but 2007 is not very different. Read Customize the Ribbon first.
Backstage
First, right-click the Navigation Bar at the top of the Navigation Pane, and then click Navigation Options on the shortcut menu. In the Navigation Options dialog box, under Display Options, select the Show System Objects check box, and then click OK. This will allow you to see the table you create. Note that is applies to all databases, so you may wish to switch it back off when you are finished.
Next, under Options, choose Client Settings and scroll down to General. You will see Show add-in user interface errors, make sure it is selected.
You will need a table called USysRibbons:
Create Table USysRibbons (ID Counter Primary Key,
RibbonName Text(255),RibbonXml Memo)
You might like to add a unique index to RibbonName, otherwise you could end up with more than one ribbon with the same name.
You will need some XML, you can just cut and paste into the newly created table.
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="false">
<!-- Ribbon XML -->
</ribbon>
<backstage>
<button idMso="FileSave" visible="false"/>
<button idMso="SaveObjectAs" visible="false"/>
<button idMso="FileSaveAsCurrentFileFormat" visible="false"/>
<button idMso="FileOpen" visible="false"/>
<button idMso="FileCloseDatabase" visible="false"/>
<tab idMso ="TabInfo" visible="false"/>
<tab idMso ="TabRecent" visible="false"/>
<tab idMso ="TabNew" visible="false"/>
<tab idMso ="TabPrint" visible="false"/>
<tab idMso ="TabShare" visible="false"/>
<tab idMso ="TabHelp" visible="false"/>
<button idMso="ApplicationOptionsDialog" visible="false"/>
<button idMso="FileExit" visible="false"/>
</backstage>
</customUI>
Set the Ribbon Name to say, "BackstageCustom". It should be fairly obvious which line relates to which part of the Backstage.
You now have to close and reopen the database (Compact & Repair is probably the quickest way to do this, but make sure you have a backup before you use this method). There will be a lot of opening and closing in this.
You can now go to Options->Current Database and scroll down to Ribbon and Toolbar Options, select the newly created ribbon under Ribbon Name. When you close Options, you will get a warning that you must close and open the database for the changes to take effect.
When you do, you will no longer be able to see Options on the backstage, nor will you see much except a list of recent databases. Look at the XML above, you can see that everything is set to false.
I reckon the easiest way out of the situation is to open the USysRibbons table and change this line:
<button idMso="ApplicationOptionsDialog" visible="false"/>
to
<button idMso="ApplicationOptionsDialog" visible="true"/>
Open and close again, and remove the ribbon from Ribbon Name, under Options. Open and close and you are back to where you started, more or less.

To add to Fionnuala's excellent answer, Access 2013 has different options in the FILE menu so the XML needs to be slightly modified. Follow the answer exactly but replace the XML with this, which hides the Options menu and leaves Print and Exit.
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="false">
<!-- Ribbon XML -->
</ribbon>
<backstage>
<button idMso="ApplicationOptionsDialog" visible="false"/>
</backstage>
</customUI>

All,
I've spent a lot of time ... on a lot of websites ...
Here's XML that will:
Disable QAT
Disable "Database Options"
Disable "Save As"
Disable "Close" (so you can programmatically control what happens)
Enable only the "Home" TAB ... I actually rebuilt it from scratch
This code pretty much "exactly" looks like the standard "HOME" tab in MS Access 2013.
You can use this to really lock down your app ... in combination with some good code to disable special keys at startup, etc.
Here ya go:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="true">
<!-- Ribbon XML -->
<tabs>
<tab id="dbCustomHome" label="HOME" visible="true">
<group id="dbViews" label="Views">
<control idMso="ViewsSwitchToDefaultView" size="large" label="View" enabled="true"/>
</group>
<group id="dbClipboard" label="Clipboard">
<control idMso="PasteSpecial" size="large" label="Paste" enabled="true"/>
<control idMso="Cut" label="Cut" enabled="true"/>
<control idMso="Copy" label="Copy" enabled="true"/>
<control idMso="FormatPainter" label="Format Painter" enabled="true"/>
</group>
<group id="dbSortFilter" label="Sort and Filter">
<control idMso="FiltersMenu" size="large" label="Filter" enabled="true"/>
<control idMso="SortUp" label="Ascending" enabled="true"/>
<control idMso="SortDown" label="Descending" enabled="true"/>
<control idMso="SortRemoveAllSorts" label="Remove Sort" enabled="true"/>
<control idMso="SortSelectionMenu" label="Selection" enabled="true"/>
<control idMso="FilterAdvancedMenu" label="Advanced" enabled="true"/>
<control idMso="FilterToggleFilter" label="Toggle Filter" enabled="true"/>
</group>
<group id="dbRecords" label="Records">
<control idMso="DataRefreshAll" size="large" label="Refresh All" enabled="true"/>
<control idMso="GoToNewRecord" label="New" enabled="true"/>
<control idMso="RecordsSaveRecord" label="Save" enabled="true"/>
<control idMso="Delete" label="Delete" enabled="true"/>
<control idMso="RecordsTotals" label="Totals" enabled="true"/>
<control idMso="SpellingAccess" label="Spelling" enabled="true"/>
<control idMso="RecordsMoreRecordsMenu" label="More" enabled="true"/>
</group>
<group id="dbFind" label="Find">
<control idMso="FindDialog" size="large" label="Find" enabled="true"/>
<control idMso="ReplaceDialog" label="Replace" enabled="true"/>
<control idMso="GoToMenuAccess" label="Go To" enabled="true"/>
<control idMso="SelectMenuAccess" label="Select" enabled="true"/>
</group>
<group id="dbTextFormat" label="Text Formatting" centerVertically="true">
<box id="TopBx">
<control idMso="Font" enabled="true"/>
<control idMso="FontSize" enabled="true"/>
<buttonGroup id="buttonGroup_TopRow">
<control idMso="Bullets" enabled="true"/>
<control idMso="Numbering" enabled="true"/>
<separator id="separator1" />
<control idMso="IndentIncrease" enabled="true"/>
<control idMso="IndentDecrease" enabled="true"/>
<separator id="separator2" />
<control idMso="AlignLeftToRightMenu" enabled="true"/>
</buttonGroup>
</box>
<box id="BottomBx">
<buttonGroup id="buttonGroup_BottomRow">
<control idMso="Bold" enabled="true"/>
<control idMso="Italic" enabled="true"/>
<control idMso="Underline" enabled="true"/>
<separator id="separator3" />
<control idMso="FontColorPicker" enabled="true"/>
<control idMso="TextHighlightColorPicker" enabled="true"/>
<control idMso="FontFillBackColorPicker" enabled="true"/>
<separator id="separator4" />
<control idMso="AlignLeft" enabled="true"/>
<control idMso="AlignCenter" enabled="true"/>
<control idMso="AlignRight" enabled="true"/>
<separator id="separator5" />
<control idMso="DatasheetGridlinesMenu" enabled="true"/>
<separator id="separator6" />
<control idMso="FontAlternateFillBackColorPicker" enabled="true"/>
</buttonGroup>
</box>
</group>
</tab>
</tabs>
</ribbon>
<backstage>
<tab idMso="TabSave" visible="false" > </tab>
<button idMso="ApplicationOptionsDialog" visible="false"/>
<button idMso="FileCloseDatabase" visible="false"/>
</backstage>
</customUI>

Because there remains a backdoor entrance to the access options by using [Quick Access Toolbar] - [Customization], an other simple solution using the same way as Fionnuala could be:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<commands>
<command idMso="ApplicationOptionsDialog" enabled="false"/>
</commands>

Related

How to edit custom ribbon in Access 2013

I received an .accdb file and my task is to hide the "Home" tab on the ribbon in Access 2013. The only thing left should be the "Add-ins" tab with already present custom buttons.
I have received some advice suggesting that there might be a custom ribbon that could be edited to accomplish this. However, I have no idea where to find it and start editing. Can it be done somewhere in the design mode, or should I use Visual Studio? Can the Custom UI Editor hack an existing XML structure of an accdb?
Thanks for any input.
As a general rule, you will find the ribbon customizations in a table called USYSRibbons.
The xml to hide home, and much everything in the ribbon would thus look like:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<officeMenu>
<!-- First we hide all the items displayed by default -->
<control idMso="FileNewDatabase" visible="false"/>
<control idMso="SourceControlCreateDatabaseFromProject" visible="false"/>
<control idMso="FileOpenDatabase" visible="false"/>
<control idMso="FileSave" visible="false"/>
<control idMso="ConvertDatabaseFormat" visible="false"/>
<control idMso="FileSaveAsMenuAccess" visible="false"/>
<control idMso="FileManageMenu" visible="false"/>
<control idMso="FileSendAsAttachment" visible="false"/>
<control idMso="MenuPublish" visible="false"/>
<control idMso="FileServerMenu" visible="false"/>
<control idMso="FileCloseDatabase" visible="false"/>
<control idMso="FileExit"
getVisible="HideExit"
getEnabled="EnableExit" />
<!-- Now let's show a single Print Command -->
<control idMso="FilePrintMenu" visible="false"/>
</officeMenu>
</ribbon>
</customUI>
There is no built in editor for custom ribbons (but as noted, you can right click on ribbons and customize them).
Open the database, go to "File" in the upper left corner, then click options.
Go to the tab "Customize Ribbon", there you can deselect the main tabs.

Windows Phone 8.1 & MenuFlyout: How to disable zoom effect

I am trying to add context menu (through MenuFlyout) for button:
<StackPanel Orientation="Horizontal">
<Button Content="Item1" />
<Button Content="Item2" />
<Button Content="Item3" >
<Button.Flyout>
<MenuFlyout>
<MenuFlyoutItem Text="Item31" />
<MenuFlyoutItem Text="Item32" />
<MenuFlyoutItem Text="Item33" />
</MenuFlyout>
</Button.Flyout>
</Button>
</StackPanel>
But MenuFlyout zooms Button on which it opens. How to disable zoom effect?
You can't.
If you really need a simple overlay without animations, you need to create your own (an UserControl is an idea).

cockpit configuration not being picked up

I created my own cockpit from the ycockpit template, called TestCockpit. When I log into this cockpit, a List of Orders is displayed on the browser area.
I've configured the listView and the editorArea, both using XML files according to convention. The files are named listViewContentBrowser_Order.xml and editorArea_Order.xml, and are both placed under the folder for the ordermanagergroup user group.
When I run an update running system, the listView is affected by my configuration but the editorArea not.
This is what my editorArea config file looks like:
<?xml version="1.0" encoding="UTF-8"?>
<editor>
<group qualifier="General" visible="true" initially-opened="true">
<label key="testcockpit.config.label.properties"/>
<property qualifier="Order.code"/>
<property qualifier="Order.user"/>
<property qualifier="Order.currency" visible="false"/>
<property qualifier="Order.date"/>
<property qualifier="Order.displayStatus"/>
</group>
<group qualifier="admin" visible="true" initially-opened="false">
<label key="cockpit.config.label.administration"/>
<property qualifier="Item.pk" />
<property qualifier="Item.creationTime" />
<property qualifier="Item.modifiedtime" />
</group>
<custom-group
class="de.hybris.platform.cockpit.services.config.impl.UnassignedEditorSectionConfiguration"
qualifier="unassigned"
initially-opened="false">
<label key="cockpit.config.label.other"/>
</custom-group>
</editor>
Any ideas why my configuration doesn't affect the cockpit? I do log in with a user from the ordermanagergroup, by the way.
Try clicking on "Menu" (top left in your cockpit), then selecting "User Settings" and "Reset Personalized Settings".

Transition in Spark Components like BorderContainer, List, etc.,

I am developing flex mobile project in adobe air, using flash builder 4.7, i am able to apply Transition in views, How can i apply Transition to Spark components like BorderContainer, List...
<s:BorderContainer id="Login" backgroundAlpha="0" borderStyle="inset" visible="true" >
<s:Label width="100%" height="100%" color="white" text="Logon Details"/>
<s:TextArea prompt="UserName" id="txtuser" />
<s:TextArea prompt="Password" id="txtpwd" />
<s:CheckBox />
<s:Button id="btnlogin" color="white" fontFamily="Book Antiqua" fontWeight="bold"/>
<s:Button id="btnreset" color="white" fontFamily="Book Antiqua" fontWeight="bold"/>
</s:BorderContainer>
I would like to apply Transition for above BorderContainer, like moving BorderContainer to another location in screen on clicking a button.
Thanks in Advance...
Here is a little code to show you how to use a Tween manually, without a Transition.
<fx:Declarations>
<mx:Move id="myMove" target="{login}" xTo="200" yTo="500"/>
</fx:Declarations>
<s:Group width="100%" height="100%">
<s:BorderContainer id="login" />
</s:Group>
<s:Button id="button" click="myMove.play(); button.enabled=false;" />
You may find, for each Tween, some code example in the reference, such as this one.

Flex spark FormLayout on TileLayout columns

I always end up hard-coding things that appear to be so simple...
This is the scenario:
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<s:Form>
<s:layout>
<s:TileLayout requestedColumnCount="2"
verticalAlign="middle" />
</s:layout>
<s:FormItem label="Label with long text">
<s:TextInput />
</s:FormItem>
<s:FormItem label="Label with long text">
<s:Label text="something" />
</s:FormItem>
<s:FormItem label="shortLabel">
<s:TextInput />
</s:FormItem>
<s:FormItem label="shortLabel">
<s:Label text="something" />
</s:FormItem>
</s:Form>
</s:Application>
Is there a simple way to give each tile layout column a FormLayout?
In form layout, all the first items on FormItem containers are aligned.
You have overridden form layout that's why elements are not aligned correctly.
As I understand you need multi columns form. Flex doesn't support such functionality now.
Possible solutions are:
1. Use 2 forms in container. In such case form items would be aligned.
2. Define form items sizes.
3. Write you own new multi column form layout and share it.
Spark FormLayout extends VerticalLayout, changing its inheritance to TileLayout in customLayout class(say FormTileLayout) worked for my project.