ACC: Version Argument for DoMenuItem (2.0/95)

Last reviewed: August 29, 1997
Article ID: Q112065
The information in this article applies to:
  • Microsoft Access versions 2.0, 7.0

SUMMARY

Novice: Requires knowledge of the user interface on single-user computers.

When the menu structure changed from Microsoft Access version 1.x to Microsoft Access version 2.0, a new argument was added to the DoMenuItem action. The new version argument enables you to use code written for either a version 1.x, 2.0, or 7.0 database. Note that this argument is only available in code.

MORE INFORMATION

In Microsoft Access version 7.0

The version argument takes either of three constants: acMenuVer1X, acMenuVer20, or acMenuVer70. The default for this argument is acMenuVer1X.

If you write code in Microsoft Access 7.0, and you want to use version 7.0 menu commands, set this argument to acMenuVer70.

The syntax for the DoMenuItem method is:

   DoCmd.DoMenuItem menubar, menuname, command [,subcommand][,version]

The following example using the above syntax chooses Paste from the Edit menu in form Design view in Microsoft Access 7.0:

   DoCmd.DoMenuItem 3, acEditMenu, acPaste,  , acMenuVer70

In Microsoft Access version 2.0

The version argument takes either of two constants: A_MENU_VER1X or A_MENU_VER20. The default for this argument is A_MENU_VER1X.

If you write code in Microsoft Access version 2.0 and you want to use version 2.0 menu commands, set this argument to A_MENU_VER20.

The syntax for the DoMenuItem action is:

   DoCmd DoMenuItem menubar, menuname, command [,subcommand][,version]

The following example using the above syntax chooses Paste from the Edit menu in form Design view in Microsoft Access 2.0:

   DoCmd DoMenuItem A_FORMBAR, A_EDITMENU, A_PASTE, ,A_MENU_VER20

REFERENCES

For more information about the DoMenuItem action, search for "DoMenuItem," and then "DoMenuItem method" using the Microsoft Access for Windows 95 Help Index.

For more information about the DoMenuItem action, search for "DoMenuItem,"

and then "DoMenuItem Action" using the Microsoft Access 2.0 Help menu.

Keywords          : kbprg PgmOthr SynGnrl
Version           : 2.0 7.0
Platform          : WINDOWS
Hardware          : x86
Issue type        : kbinfo


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.