Hide Show Menus and Toolbars

CanWest

Registered User.
Local time
Today, 14:59
Joined
Sep 15, 2006
Messages
272
I have a form called frm_Logon that opens on database startup

In the On Open Event I have the following code:
Code:
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i

This should hide all toolbars and menus. However it has absolutely no effect. I have tried to change the false to true just to see what happened and there was no change.

I have used this for years and it has always worked. Can someone tell me what I am missing?

I am using Access 2003 on Windows 7

Thanks
 
The commandbars contains the following objects:

Property Sheet
Navigation Pane Category Pop-up
Form View Popup
Form View Record
Form View Control
Form View Subform
Font/Fore Color
Fill/Back Color
Line/Border Style
Line/Border Width
Line/Border Color
Special Effect
Alternate Color
Form View
Formatting (Form/Report)
Web
Source Code Control
Object Dependencies
Menu Bar
&Legacy Keyboard Support

Form Design
Toolbox
Form Design Section
Form Design Form
Form Design Control
Fill/Back Color
Font/Fore Color
Line/Border Color
Datasheet Special Effect
Gridlines
Alternate Color
Database
Relationship
Table Design
Table Datasheet
Query Design
Query Datasheet
Filter/Sort
Report Design
Print Preview
Formatting (Datasheet)
Macro Design
Utility 1
Utility 2
View Design
Diagram Design
Stored Procedure Design
Trigger Design
PivotTable
PivotChart
Formatting (PivotTable/PivotChart)
Function Design
Database TitleBar
Table DesignTitleBar
Table Design Upper Pane
Table Design Lower Pane
Table Design Properties
Index TitleBar
Index Upper Pane
Index Lower Pane
Index Properties
Actions
Relationship TableFieldList
Relationship QueryFieldList
Relationship Join
Table Design Datasheet
Table Design Datasheet Column
Table Design Datasheet Row
Table Design Datasheet Cell
Query
Query DesignFieldList
Query Design Join
Query DesignGrid
Query SQLTitleBar
Query SQLText
Query Design Properties
Query Design Datasheet
Query Design Datasheet Column
Query Design Datasheet Row
Query Design Datasheet Cell
Filter General Context Menu
Filter Field
Filter FilterByForm
Form DesignTitleBar
Form Design Control OLE
Report DesignTitleBar
Report DesignReport
Report Design Section
Report Design Control
Form/Report Properties
Form View Subform Control
Form Datasheet
Form Datasheet Column
Form Datasheet Subcolumn
Form Datasheet Row
Form Datasheet Cell
Print Preview Popup
Macro TitleBar
Macro UpperPane
Macro Condition
Macro Argument
ModuleUncompiled
ModuleCompiled
Module Immediate
Module Watch
Database Table/Query
Database Form
Database Report
Database Macro
Database Module
Database Page Popup
Database Background
OLE Shared
Global
Object Browser
Module LocalsPane
Tab Control
Tab Control on Report Design
View Table Design Popup
View Design Background Popup
View Design Diagram Pane Popup
View Design Field Popup
View Design Grid Pane Popup
View Design SQL Pane Popup
Diagram Design Popup
Diagram Popup
View Design Multiple Select Popup
View Design Join Line Popup
View Table View Mode Submenu
View Show Panes Submenu
Join Line Popup
Stored Procedure Design Datasheet
View Design Datasheet
Diagram Design Label Popup
Stored Procedure Design Popup
Trigger Design Popup
Database Shortcut Popup
Database Custom Group Popup
Database View
Database Stored Procedure
Database Diagram
Table PivotTable Popup
Table PivotChart Popup
Query PivotTable Popup
Query PivotChart Popup
Form PivotTable Popup
Form PivotChart Popup
Stored Procedure PivotTable Popup
Stored Procedure PivotChart Popup
View PivotTable Popup
View PivotChart Popup
Function Design
PivotTable Popup
PivotChart Popup
Function Datasheet Popup
Function Pivot Table Popup
Function Pivot Chart Popup
Column Filter
Navigation Pane Pop-up
Navigation Pane List Pop-up
Navigation Pane View Pop-up
Navigation Pane object Pop-up
Navigation Pane data page Pop-up
Navigation Pane Group Header Pop-up
Navigation Pane SortBy Pop-up
Navigation Pane ViewBy Pop-up
Navigation Pane Groups in current Category
SharePoint List Options Popup

Workflow
Export Pop-up
Import/Link Pop-up

Subform Datasheet
Clipboard
Envelope
System
Online Meeting
Task Pane

Property Editor
Office Clipboard
XML Source
Research
XML Document
Signatures
Document Actions
Clip Art

Selection and Visibility
Document Management
Document Updates
Mail Merge Panes
Fax Service
Meeting Workspace
Attachment Options
Status Bar
Ribbon


Do you really want to disable all those?

I tried it and it seemed to work fine
 
Yes I do. This has always worked for me in the past but now does not seen to work on this one database. I am trying to figure out what might be overriding it.
 

Users who are viewing this thread

Back
Top Bottom