Re: DoCmd.DoMenuItem in Access 2007
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Thu, 27 Aug 2009 12:15:37 +0800
The 500 odd options in RunCommand provide most of the old DoMenuItem functionality. They all start with acCmd, and they are generally not that hard to spot if you have an idea of what you want to do, e.g.:
RunCommand acCmdSaveRecord
RunCommand acCmdRecordsGotoNew
If you wish to study the RunCommand constants, Terry Wickenden's list is probably the best source:
http://www.accessruncommand.com/
In some cases, there are better ways to do things, e.g. to undo the edits in a bound form, use:
If Me.Dirty Then Me.Undo
For more general guidelines on what you might need to know to convert to A2007, see:
http://allenbrowne.com/Access2007.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Chegu Tom" <noemail@xxxxxxxxx> wrote in message news:OFEmO$nJKHA.4376@xxxxxxxxxxxxxxxxxxxxxxx
Never trust a wizard!
The command button wizard in previous versions of access made extensive use of DoCmd.DoMenuItem which isn't available in 2007
I have found, for example, that
DoCmd.RunCommand acCmdFind
does the same as
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Is there a list available of alternatives to DoCmd.DoMenuItem (especially those used by the previous button wizards)? I have some sloppy code to fix before my users change to Office 2007.
.
- References:
- DoCmd.DoMenuItem in Access 2007
- From: Chegu Tom
- DoCmd.DoMenuItem in Access 2007
- Prev by Date: Excactly jump to the field being found.
- Next by Date: Re: Main Menu Form Will Not Open
- Previous by thread: DoCmd.DoMenuItem in Access 2007
- Next by thread: Re: odd subform which is on the one side of a one to many relationship
- Index(es):
Relevant Pages
|