ACC: Cannot Add Security Items to Custom MenuID: Q103992
|
Advanced: Requires expert coding, interoperability, and multiuser skills.
If you add a security command to a custom menu with a DoMenuItem action,
the security command will be unavailable.
You can only perform DoMenuItem actions with commands available from the current context. If you have a form open, you can only perform menu items available to a form. Since security items are available only from the Database window, they will not work when invoked from a form.
You can add the security command Change Password to a custom menu using
the following sample macro:
Macro Name Action Defined Below
----------------------------------------------
Change Password Echo 1
SelectObject 2
DoMenuItem 3
DoMenuItem 4
SelectObject 5
Change Password Actions
---------------------------------------------------------
1. Echo
Echo On: No
2. SelectObject
Object Type: Form
Object Name: <name of the form that the menu is on>
In Database window: Yes
3. DoMenuItem
Menu Bar: Database
Menu Name: Security
Command: Change Password
4. DoMenuItem
Menu Bar: Database
Menu Name: Window
Command: Hide
5. SelectObject
Object Type: Form
Object Name: <name of the form that the menu is on>
In Database window: No
This behavior no longer occurs in Microsoft Access version 7.0.
Action Defined Below
-------------------------
AddMenu 1
Security Menu Actions
---------------------------------------------
1. AddMenu
Menu Name: Security Menu
Menu Macro Name: Security Menu Password
Status Bar Text: Change Password
Macro Name Action Defined Below
------------------------------------------
Change Password DoMenuItem 1
Security Menu Password Actions
------------------------------
1. DoMenuItem
Menu Bar: Database
Menu Name: Security
Command: Change Password
Keywords : kbusage McrOthr
Version : 1.0 1.1 2.0
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: March 26, 1999