?
Solved

Access 2007: Code to hide the navigation pane does NOT work

Posted on 2014-04-02
11
Medium Priority
?
996 Views
Last Modified: 2014-06-17
Hi

I have several Access 2007 frontend apps (which link to tables in a backend database). Regardless if I relink (per VBA) the tables or not, and REGARDLESS of the following code used as the LAST action in the main form Load:

    DoCmd.SelectObject acTable, , True
    DoCmd.RunCommand acCmdWindowHide

the navigation pane stays open (in about 90% of the cases). This drives me nuts ! I even made a copy of such an app, uncheck all the things that one can uncheck, including the "Show navigation pane", but the nav pane STILL shows up. Then as the last step, I made an accde from that app, and the nav pane STILL shows up !

What shall I do ? Accept that MS Access 2007 has a big bug in that respect and let my users see all the tables and queries and forms which I defined, or what ?

Anybody can help me further ?

Thanks
Bernard
0
Comment
Question by:bthouin
[X]
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
  • 5
  • 3
11 Comments
 
LVL 31

Expert Comment

by:Helen Feddema
ID: 39973703
I use something like this code to hide or show the navigation pane, from hot keys in the AutoKeys macro.  Ctrl-H calls HideDBWindow and Ctrl-S calls ShowDBWindow.

Public Function ShowDBWindow()
'Created by Helen Feddema 4-Apr-2010
'Last modified by Helen Feddema 4-Apr-2010

On Error Resume Next

   DoCmd.SelectObject objecttype:=acTable, _
      InDatabaseWindow:=True
  
End Function

Public Function HideDBWindow()
'Created by Helen Feddema 4-Apr-2010
'Last modified by Helen Feddema 4-Apr-2010

On Error Resume Next

   DoCmd.SelectObject objecttype:=acTable, _
      InDatabaseWindow:=True
   DoCmd.RunCommand acCmdWindowHide
  
End Function

Open in new window


AutoKeys macro
0
 
LVL 1

Author Comment

by:bthouin
ID: 39974575
Hi Helen

Your code and my code are the same. I've tried using the InDatabaseWindow keyword instead of nothing for the last parameter in the DoCmd.SelectObject statement, it does not change anything.

I've seen the 2 lines of VBA code in your post in so many other posts on the internet and in EE posts.

I'm sorry, but these 2 lines of code just DO.NOT.work !
0
 
LVL 14

Expert Comment

by:Bill Ross
ID: 39980025
Hi,

I think your code is fine.  Something is reopening the ribbon somewhere.  You need to find that and correct it...

FYI - do not run this code in AutoExec.  That won't work.  Run it in the OnOpen event of a start up form.  

Thanks,

Bill
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 1

Author Comment

by:bthouin
ID: 39985282
Hi Bill

Sorry, but that doesn't work either. Regardless of what I do, of where I put the code, and of what variations I use in the code, the navigation pane invariably is opened after the end of my main form load.

Common guys, there MUST be a way to have this highly irritating navigation pane closed !

Help me !
0
 
LVL 1

Author Comment

by:bthouin
ID: 40111304
I've requested that this question be deleted for the following reason:

My question has no real answers. There is a fundamental bug in Access in the area of hiding the navigation pane, which is simply not possible if using the format .mdb or .accdb or .accde. The only way to do it, which I found elsewhere, is to use the .accdr format.
0
 
LVL 14

Expert Comment

by:Bill Ross
ID: 40111302
Hi,

There is something incorrect in your application that is opening the Nav Pane.  I have many apps and the user never sees the Nav Pane.  Please post a sample accdb or mdb (code works in both) and I'll try to help.

Regards,

Bill
0
 
LVL 14

Expert Comment

by:Bill Ross
ID: 40111305
There is an answer...
0
 
LVL 1

Accepted Solution

by:
bthouin earned 0 total points
ID: 40121648
Hi SouthMod and Bill

I'm sorry, but the amount of work to achieve what you're asking doesn't justify the solution of the problem. I have no time to do that. Also, my applications are running at a bank, so I just cannot make them available, and as mentioned making a "sample" is just not realistic.

I have actually found one "solution", as recommended by another of the EE gurus: I use now the accdr (runtime) format for my Access aps, which keeps the apps locked at all time, and not only solves the navigation pane problem, but also blocks  an app startup with shift key, and opening the code pane with Alt+F11. I know one can also turn off these 2 last ones, but the effort needed to make an accdr is so ridiculously low that it beats any other solution hands down.

So please close/delete this question.

Thanks
Bernard
0
 
LVL 1

Author Closing Comment

by:bthouin
ID: 40138853
This is not a solution but a workaround, but it works for me, so I'll leave it at that.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

777 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