Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DoCmd.DoMenuItem SELECT MENU????

Status
Not open for further replies.

hinchdog

Programmer
Feb 14, 2001
380
US
how do you choos the select menu using this command. microsoft help says this is a menu argument list but i can't find it. anyone know this?

-hinch
 
Hi Hinch,
Everything you can find on the standard menu is also available using another, (I find easier and more understandable) method:

DoCmd.RunCommand acCmdSaveRecord
DoCmd.RunCommand acCmdCut
DoCmd.RunCommand acCmdDelete
DoCmd.RunCommand acCmdExit
DoCmd.RunCommand acCmdFind

as a few examples...

And here, borrowed from F1 help for your viewing pleasure:

In Microsoft Access 97, the DoMenuItem method was replaced by the RunCommand method. The DoMenuItem method is included in this version of Microsoft Access only for compatibility with previous versions. When you run existing Visual Basic code containing a DoMenuItem method, Microsoft Access will display the appropriate menu or toolbar command for Microsoft Access 2000. However, unlike the DoMenuItem action in a macro, a DoMenuItem method in Visual Basic code isn't converted to a RunCommand method when you convert a database created in a previous version of Microsoft Access.

Some commands from previous versions of Microsoft Access aren't available in Microsoft Access 2000, and DoMenuItem methods that run these commands will cause an error when they're executed in Visual Basic. You must edit your Visual Basic code to replace or delete occurrences of such DoMenuItem methods.

Go in to any module and start typing. All your choices will appear after the runcommand is selected and there are tons. :) Gord
ghubbell@total.net
 
thanks, i'll give it a whirl. i wish they would stop changing their language so much!! :)

-hinch
 
Watch out,

despite the following statement from the previous posts:

In Microsoft Access 97, the DoMenuItem method was replaced by the RunCommand method

The wizards in Access 97 for buttons etc, still insert code using domenuitem, which I believe will not work in Access 2000

Stu.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top