ACC: Version Argument for DoMenuItem (2.0/95)

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.

Additional query words:

Keywords : kbprg
Version : WINDOWS:2.0,7.0
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: October 20, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.