C
cefrancke
I have set the Startup properties to the following...
All menus, toolbars, etc are turned off plus these are unchecked
Allow Full Menus
Allow Built-in Toolbars
Allow Default Shortcut Menus
Allow Toolbar/Menu Changes
Use Access Special Keys
For admin users...
I would like to run some VB code in my Main startup form (OnOpen) to
show the default menu/toolbars as if the startup properties were not
set.
However I would like to leave the startup properties in tact, in case a
non-admin user logs in.
I use...
If Admin then
CommandBars("Database").Visible = True ' Trying to show a menu
else 'non-admin
'non-admin code
end if
The issues are...
1. The CommandBar "Menu Bar" is displayed after the Main form is
visible, even with the startup properties set to turn off all
menus/toolbars. The menu seems limited and only related to forms and
records. The menu is definately not like the standard startup menu for
an Access database.
This seems to contradict what the startup properties suggest.
2. Using CommandBars("Database").Visible = True in the OnOpen event for
the case of admins does not show the toolbar or any other toolbar,
though I have not tried them all. I tried "Form View", "Formatting
(Form/Report)".
I do notice that the menus show up for a short duration along with the
normal default menus and then disappear after the Main form is visible.
It seems that the startup properties take effect after the Main form is
visible.
However, without restarting Access, if I restart the form (I enabled
the database window) the menus show up as coded.
But, the menus dont behave appropriately to the context of the window,
ie the "Form View" menu remains even if I click on the Database window.
Is there a way to bring up the default menu behavior for the admin case
without having to reset the startup properties and restarting?
TIA
All menus, toolbars, etc are turned off plus these are unchecked
Allow Full Menus
Allow Built-in Toolbars
Allow Default Shortcut Menus
Allow Toolbar/Menu Changes
Use Access Special Keys
For admin users...
I would like to run some VB code in my Main startup form (OnOpen) to
show the default menu/toolbars as if the startup properties were not
set.
However I would like to leave the startup properties in tact, in case a
non-admin user logs in.
I use...
If Admin then
CommandBars("Database").Visible = True ' Trying to show a menu
else 'non-admin
'non-admin code
end if
The issues are...
1. The CommandBar "Menu Bar" is displayed after the Main form is
visible, even with the startup properties set to turn off all
menus/toolbars. The menu seems limited and only related to forms and
records. The menu is definately not like the standard startup menu for
an Access database.
This seems to contradict what the startup properties suggest.
2. Using CommandBars("Database").Visible = True in the OnOpen event for
the case of admins does not show the toolbar or any other toolbar,
though I have not tried them all. I tried "Form View", "Formatting
(Form/Report)".
I do notice that the menus show up for a short duration along with the
normal default menus and then disappear after the Main form is visible.
It seems that the startup properties take effect after the Main form is
visible.
However, without restarting Access, if I restart the form (I enabled
the database window) the menus show up as coded.
But, the menus dont behave appropriately to the context of the window,
ie the "Form View" menu remains even if I click on the Database window.
Is there a way to bring up the default menu behavior for the admin case
without having to reset the startup properties and restarting?
TIA