Solved

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

Posted on 2013-05-23
8
451 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 VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

932 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