Microsoft KB Archive/112065

From BetaArchive Wiki

Article ID: 112065

Article Last Modified on 10/11/2006



APPLIES TO

  • Microsoft Access 2.0 Standard Edition
  • Microsoft Access 95 Standard Edition



This article was previously published under Q112065

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


SUMMARY

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: kbinfo kbprogramming KB112065