Solved

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

Posted on 2013-05-23
8
448 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
 
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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now