Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2013-05-23
8
455 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

809 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