Solved

Change -- Current Database Options - After Opening database - Access 2010

Posted on 2013-05-23
8
454 Views
Last Modified: 2013-05-24
Version -->: Access 2010

Question
Can I change database options to - show menus etc  while the database is open?
eg --> Can I do a Ctrl S (I'm looking for VBA code) and show the Navigation Pane, Show Full Menus, Allow Default Shortcut Menus.

I know
I can open the database with the shift key and see what I want.
I can Display Navigation Pane by using the below code
                  DoCmd.SelectObject acTable, "tbl_MyTable", True


A little more info
I set Current Database options so my users don't see some things I don't want them to see
    * Display Navigation Pane = False
    * Allow Full Menus = False
    * Allow Default Shortcut Menus = False

I want a way in code to show the above without getting out of the database.

Thanks in advance for your help.
LJG
0
Comment
Question by:LJG
  • 3
  • 3
  • 2
8 Comments
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 39192722
I don't think so, ...the database must be restarted for these settings to take effect
(I will cheat and just run the Compact/repair utility)

Do you not get this message when you change the settings manually?
0
 
LVL 3

Expert Comment

by:Shane Kahkola
ID: 39192727
I know the command to hide and display the navigation pane from code is:
DoCmd.RunCommand acCmdWindowHide
DoCmd.runCommand acCmdWindowUnHide

Open in new window

I know you can completely restrict the ribbon and show it all again by doing this:
DoCmd.ShowToolbar "Ribbon", acToolbarNo
DoCmd.ShowToolbar "Ribbon", acToolbarYes

Open in new window


I'll play around with the rest and see what I can find.
0
 
LVL 3

Expert Comment

by:Shane Kahkola
ID: 39192739
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 2

Author Comment

by:LJG
ID: 39192750
Thanks for the info

I've tried with no error messages, and little success.

This works for me.
      *  DoCmd.SelectObject acTable, "tbl_MyTable", True

This does not work for me.
      *  DoCmd.RunCommand acCmdWindowUnhide
      *  DoCmd.ShowToolbar "Ribbon", acToolbarYes
0
 
LVL 2

Author Comment

by:LJG
ID: 39192826
Attached is a sample

Open it with a shift key to see the code.
Test1.accdb
0
 
LVL 3

Expert Comment

by:Shane Kahkola
ID: 39193001
Try these:

CurrentDB.Properties("ShowNavigationPane") = True    <-- not certain if that one is right

CurrentDB.Properties("AllowFullMenus") = True

CurrentDB.Properties("AllowShortcutMenus") = True
0
 
LVL 2

Author Closing Comment

by:LJG
ID: 39195191
Out of all the solutions - this was the only one I could get to work for me.  I did it a little different.

1) On my Quick Access Toolbar I put two extra Icons (Note this toolbar is unique to my computer and does not follow the application.)
    * Compact & Repair
    * Close Database
2) If the database is open with >>no<< access to the menus and Navigation Pane, hold the shift key down, click Compact & Repair icon on the toolbar - your back up with full ribbons & Navigation pain.

3) If the database is open with >>Full<< Ribbons and Navigation Pane (held shift down while opening it) and you want to see what the user sees, click Close Database icon on the toolbar - you should see the database on the list under the file ribbon - click it.  You are back up with no ribbons or Navigation pain.

Hope this helps someone.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39195217
ok
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question