Custom ribbon does not display when database is opened from File menu - ms-access

A custom ribbon is assigned to an (entire) database in the options for "Current Database" and displays when I open the database with a shortcut like this:
"C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE" D:\d\music.accdb
However, if I close the database and re-open it from the File menu, the custom ribbon is no longer displayed.
If I attempt to load the custom ribbon from VBA, I get an error stating it is already loaded. (The "Client Settings" option is set to show add-in user interface errors, as of course the ribbon would otherwise not display when opened using the first method.)
I specifically re-assigned an individual form from its own custom ribbon to the database-wide custom ribbon to see if this would make the ribbon appear, but it did not when I opened the form. (The form's specific custom ribbon appeared okay before the reassignment.)
I'm using Access 16 as part of Office 365
.
Also, the database is listed twice on recently opened files. I have double-checked again and again: the exact same file is listed twice, with two different timestamps, as the last two files opened. Clicking the icon for one opens the database with the custom ribbon displayed; the other does not. If I instead browse and re-open the closed file from the Windows folder, the custom ribbon is not displayed.
Any ideas what would cause this?

dbmitch put me in the right direction. I was able to solve this and also eliminate the duplicate listing for the database on the File: Open: Recent menu by deleting all records in the table USysRibbons, performing a compact & repair, then restoring data to USysRibbons.

Related

MS Access 2010 Ribbon Not Changing From Report To Form

In an application I have two ribbons: a "General" one which is used for all forms, and a reports-specific one for all reports. From a "Reports Manager" style form, a user can select a report and preview it.
When the report opens, it correctly displays the Reports Ribbon. However, when the report is closed, the Reports Manager form is still showing the Reports Ribbon, instead of the general one.
Once this form is closed, the Ribbon changes back to the general one.
Note that users access this application, as an accde, via Terminal Server.
This incorrect behaviour does NOT happen on a local development machine, so I suspect it is due to a TS 'refresh' issue - which I have noticed in a couple of other circumstances.
Is there anyway to 'force' a refresh of the Ribbon when a report is closed, and the Reports Manager form is therefore displayed?
I would consider in your startup code grabbing a handle to the main ribbon (that is not re-displaying). Then in the reports on-close event execute a ribbon invalidate command like this:
MyMainRibbon.Invalidate
So you can “force” a ribbon re-plot. This does suggest you always use a accDE, since with a accDB then any un-handed error will ALSO lose the above global var that holds a reference to the ribbon.

Create a standalone form shortcut in Microsoft Access 2013

I currently have a functioning form that searches through my database by calling a query. What I'm trying to do is turn this into a standalone application where I can simply open a file and only the form opens, running the database on the back-end. I have tried running a macro that opens the form, and I have tried creating a shortcut to my desktop, but nothing has worked.
Does anyone have any suggestions? Anything that will only show the form and the search results would be good (desktop shortcut, HTML file, etc.).
Thanks!
You will need to split your database so that the tables are located in a separate back-end file (which can be kept on a server). These instructions apply to Access 2007 and 2010 but the process is very similar for 2013.
Once this is done, your tables will become linked tables (stored in a separate file) and your front-end .addcb file will only contain queries, forms and reports.
You can control which form opens when the application loads through File -> Options -> Current Database. There are also several other useful controls here for limiting what the user can do; ie.
Hiding the list of database
Hiding the tabs (you will therefore need to create buttons to move between forms)
Hiding the Ribbon and/or status bar
Disabling Layout View
It's safest to change these settings on a copy, so you don't inadvertently lock yourself out; however, by holding down shift when opening the file from within Access, most of these options will be bypassed and you will be able to edit the database / revert these settings should you need to.
In terms of making it a "stand-alone application", it is possible to create a copy that will open without requiring the full version of MS Access on the user's PC (instead using Access Runtime).
I always distribute my front-ends as .accde format (File -> Export ACCDE). The benefits are as follows:
Smaller file size
Optimise memory usage / improves performance
VBA code runs but cannot be viewed or edited
I think what you're looking for is here:
http://office.microsoft.com/en-us/access-help/command-line-switches-for-access-HA010166605.aspx
and
http://office.microsoft.com/en-us/access-help/command-function-HA001228801.aspx
Basic idea, create a macro called AutoExec that checks for a command line argument when opening the database. Setup a shortcut with a command line argument (whatever you decide to name it, I'll use 'lookuponly' as the example.) like this:
"C:\Users\%Username%\Desktop\MyDatabase.mdb" /cmd "lookuponly"
when you double click the shortcut it should auto-run the macro and open your lookup form. Of course under newer versions of access you'll have to set the location of the database as a trusted location or access will attempt to block the database.
http://office.microsoft.com/en-us/access-help/decide-whether-to-trust-a-database-HA010256412.aspx

How to associate a file with an editor in Fex

Within FlashBuilder it is possible to open a media file (such as an image) by right clicking on the file then selecting Open With and then choosing from a list of applications to open the file with the most appropriate editor. The trouble with this approach is that it is time consuming and has to be repeated whenever a similar file type needs to be edited from within FlashBuilder.
How can I associate a file (e.g. audio.png) with an editor (e.g. Photoshop) to permanently connect the file type with the application thus ending the process of selecting the application every time a similar file type has to be edited.
Go to settings under Window->Preferences->General->Editors->File Associations.
Add a new file type (Add button near top of dialog).
Add a new "Associated Editor" in the bottom portion of that dialog. (Second Add button towards bottom.)
Select "External Programs" after clicking "Add" to pick whatever program.
you can associate file types with your app by using the <fileTypes> tag in your descriptor-app.xml (read here). Or use NativeApplication.setAsDefaultApplication() (read here), However, you can not make another application the default in flex.
Flash Builder is just an Eclipse plugin.
Here are the instructions to do what you are asking in eclipse.
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-51.xhtml
Associating editors with file types To associate editors with various
file types in the Workbench:
Open the command link General > Editors > File Associations
preference page.
Select the file type from the File types list, or click Add to add a
type that is not already on the list.
In the Associated editors list, select the editor that you want to
associate with that file type. To add an editor to the list:
Click Add. The Editor Selection dialog box opens.
Select Internal Editors or External Programs, depending on whether the editor that you want was built for the Workbench or runs outside
the Workbench.
If you select External Programs, you can click the Browse button to browse the file system.
Select the editor from the list and click OK.
Click OK to finish associating the editor with the selected file type.
When you associate an internal editor with a file type, that editor
opens in the editor area of the Workbench. For example, if you
double-click a file in the Project Explorer or an entry in the
Bookmarks or Tasks view it opens in the editor area.

Is it possible to open more than one query tab without opening another connection via Alias in Squirrel SQL?

I keep commenting out my queries in the SquirreL SQL client, but I also have been opening new connections using other Aliases, however it all gets a bit crowded in the tab area.
I've also been able to save my queries in files, which works great except for the fact that the entire path to the file (often very long) appears in the tab.
Is it possible to just have another SQL tab opened, or might there be a way to simplify how many SQL query tabs I open?
I hope, the answer will be still useful, although the question is asked some times ago :-)
Is it possible to just have another SQL tab opened, or might there be a way to simplify how many SQL query tabs I open?
You can open a new SQL-Worksheet for the current session.
Try one of the following:
Shortcut CTRL+N
Menu Session >> New SQL-Worksheet
In the toolbar, the icon right of the rollback button.
I've also been able to save my queries in files, which works great except for the fact that the entire path to the file (often very long) appears in the tab.
This changed in 3.4.0. Please see the changes
Instead of displaying the file paths in Session tabs a small button is displayed when an open file exists.
Clicking the button will open a popup menu that gives access to several information and functions concerning the file.

MS Access 2007 popup form refuses to display/not accessible in design mode (but present in list of forms)

Having a problem with MS Access 2007 refusing to display a form in design mode. I can see the code for the form (if I go through the event properties of a button that displays the form), but I cannot see the form laid out as a GUI. And, when I try and invoke this form from the application's main window, it does not display and locks up the whole GUI.
Now, I tried putting debug before and after the display of this form, and the debug does get invoked.
Anyone have any ideas? I tried looking at the Trust Center, and I set "Enable all Macros", but that didn't seem to matter.
A few steps I would take:
Make sure your form has the Auto Center, Auto Resize properties set to Yes.
I had an issue once with forms that opened outside the visible screen, Quite baffling.
Also try to change its PopUp and Modal properties to it becomes just a normal non-blocking form for your tests.
Your database may be corrupted.
Make a copy of your database and then decompile and compact it.
You can do that from the command line, for instance:
"C:\Program Files\Microsoft Office\Office12\msaccess.exe" "D:\Code\mydb.accdb" /decompile /compact
Export the VBA + Form resource, then delete the form from your Access client, then do the decompile+compact above again, then re-import the form.
' Export form and VBA to text files '
Application.SaveAsText acForm, "myForm", "myForm.txt"
' Import form and VBA from text files '
Application.LoadFromText, "myNewForm", "myForm.txt"