Modules & VBA :: Disable Navigation Pane - Not Just Minimize / Hide It
Mar 5, 2015
I would like to disable the Navigation Pane completely, based on the security level of the user that logs in, of course.
I have code that checks their level (I'm an "Admin" and everyone else is a "User"). If they are a user, then it hides the ribbon and minimizes the nav pane. If the login is mine, it enables everything.
That works, but the only problem is that the user can just maximize the Nav Pane on their own and access all the tables, and I don't want that. I can't find any code that completely disables the pane.
I have this code connected to my login button on my login form:
Code:
If Security = "User" Then
DoCmd.ShowToolbar "Ribbon", acToolbarNo
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.Minimize
Else
DoCmd.ShowToolbar "Ribbon", acToolbarYes
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.Maximize
End If
I can go to the options menu and disable the nav pane completely, so I know since only I have access to the ribbon, I could always go in each time and recheck the display nav pane option on that menu. But, that could be a little bit of a pain having to do that each time.
Also, I know I could finish the design and convert the DB to an MDE, but since my DB isn't broken up into a front/back end, I have to access that same DB everyone else uses, and if any changes need to be made, I don't want to have to use my backup, transfer over the changes any user made to the records, and then reconvert it back to an MDE each time.
If it's possible, I'd like to do all this using VBA. If they aren't an ADMIN user, then disable everything for them, but if I login, enable everything for me.
I use DoCmd.ShowToolbar "Ribbon" acToolbarNo (or acToolbarYes) depending on a value in a table which I have shown certain "trusted" users how to change.
But is it possible to do something similar with the Navigation Pane?
Is there a way to minimize the navigation pane and the upper tabs on start up? I have several big forms that don't seem to fit unless these are minimized.
I'm wondering if it is possible to create a module to hide the navigation pane and document tabs? I know this is possible via the Access Current Database options however I'd prefer this to be done via an Auto Exec that runs the sub. (i already have it for the ribbon)...
I have a data base that when first opened a login form I created pops up. I am trying to set it up so that when it opens you do not see the navigation pane. once logged in though I do want to have access to that again. I have found other VBA code online but nothing that lets me remove the navigation pane from that first form alone. I have it set so that the Ribbon is not shown when the form opens but does show once a user is logged in.
for the ribbon I used:
DoCmd.ShowToolbar "Ribbon", acToolbarNo
I thought I remembered a while ago reading a code like that for the navigation but not saving it because I did not think it would be needed (I am very new to Access) But now I cannot find it.
I would like to hide/unhide the navigation pane completely by using two buttons (pop the hood & close the hood) in a form. At this moment I used the following code:
Private Sub Command77_Click() DoCmd.SelectObject acTable, , True DoCmd.RunCommand acCmdWindowHide End Sub Private Sub Command78_Click() DoCmd.SelectObject acTable, , True End Sub
This however makes my form shut down and not my navigation pane.
I use Access 2007.I have a db split in FE(forms, queries, vbcode) & BE(tables only).I want users not to be able to view or explore the tables, the queries, the form design and details, in both Ends.Unfortunately, even disabling via VB code the menus, the db window, the tool & status bars, they appear and are accessible to the users (it only works in a non-split db, turned to an accde).
How can I disable any view on forms, queries, vbcode and tables details and data to users, in both FE and BE and only allow them to add data through specific form?
i have built an application , all i have is one main form and every action take place inside it. Before making it as .accde file for code protection, i want to hide table pane, navigation ribbon, the Main form Tab. i.e only Main form should open like a applicaiton and not inside access as a tab.
I have a user login form wherein my users authenticate their employeeid as well as their person PIN. If the user authenticates with a valid username/ password combination, then the employee id and the role (permissions) for that user are stored on the form and it is minimized to stay open. If the user that authenticates has "Admin" role then I want to unhide the navigation pane. For all other roles I want the navigation pane to remain hidden.
That said, the default setting in the database is for the navigation pane to remain hidden. I have a piece of code on the login form as follows:
Code: If Me.role = "Admin" Then DoCmd.SelectObject acTable, "NavigationPaneObject", True DoCmd.RunCommand acCmdWindowUnhide Else Exit Sub End If
This is successfully unhiding the navigation pane, but I'm getting the following error message and I don't know how to get it to go away."Run-time error '2544':
"Microsoft Access cannot find the NavigationPaneObject you referenced in the Object Name argument."The code is unhiding the navigation pane.
I'm building a web application that mimics the keyboard navigation of Microsoft Access.
What is the keyboard shortcut that will move the focus from the navigation pane on the left to the content area on the right? I can't figure out how to do this in MS Access without using the mouse.
i am running some code from vba to add a linked table and the do some lookups, then delete the linked tables.
When the linked table gets added, the navigation pane gets displayed. I have set it to do not display in the settings and it does not when it opens but when this code runs it opens and then stays open until the db is closed and reopened.
I am trying to use my db as a software and I really do not want this to show.
I have also noticed this in a database I have which has update queries and was fine in access 2000 but does what i described above when using in access 2010.
I am now working on this new database. I would like to make a calculation so that I could derive a value called eGFR from a patient's serum creatinine. This is a test of kidney function.I am having the following problems.
a. Modules are not appearing in the Navigation Pane of the Access 2007. When I press 'Object Types' in the Navigation Pane I get all object types such as tables, queries, forms, reports, macros but not modules. I know there are modules as I have written lots of vba code.
b. I have written the following code within this Function. The following is the code.
Public Function eGFR(creatinine, Gender, Age) As Single If IsNull(Age) Or IsNull(creatinine) Then eGFR = 0 Else
[code]....
This code is working fine in another database, however when I try to upload a query in the current database that has this function in one of the fields, I get an error saying the the function eGFR does not exit.
I have inserted the function into one of the modules that I have managed to enter.
Do I need to deposit the code elsewhere? How do I access Modules from the Navigation Pane?
I am not able to disable NavigationButton when i login navigation form using login form. I am using MS access 2007 - 2010.i am using below code but getting error.
I have three access 2010 tables, each standing alone with their own navigation pane, etc. Is there a way that I can put all 3 tables into one navigation pane? What I need is to build a Switchboard where each of the 3 tables are my choices .
I have inherited forms, some of which somehow lock the Navigation Pane. For those that do I cannot find how the Nav Pane is locked. Is it a form property? If so which? "acCmdWindowHide" is not used in the program.
This issue prevents me from viewing form properties or Form VBA when such an open form is switched to the Design View.
I tried to modified access 2010 database. But I open it the Navigation Pane is grey out (disable) and I cannot to see any database object. How to make the Navigation Pane active?
In Office 365 and Access 2013, when I right click on the top of the Navigation Pane and choose the Navigation Options I get a screen with NO Categories and NO Groups. I see the "Add" buttons on the bottom but they are grayed out.
Is it possible to access database objects without using the nav pane? I'd like to keep the nav pane turned off on a shared database so that the regular users don't get confused, but I have need to edit various objects. I could just turn it on and off as needed but I was hoping there was another way to access the objects.
Using A2010, for some reason, whenever I created a new Access Object and save it, the Navigation Pane doesn't automatically update to list the new object. Same thing for if I delete an object. This only started happening about halfway into the process of creating this database. For now, I've been compacting and repairing the database to "refresh" the file and then the Navigation pane updates.
How do I get back to this? Somehow I changed it, now my objects are "shortcuts", and my original grouping disappeared. I tried to manually put it back to the way it was with the same names but now it thinks its "custom". Can I somehow just switch it back to its original view?