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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DoCmd.DoMenuItem Commands 2

Status
Not open for further replies.

MJCoxy

Programmer
Nov 22, 2001
16
0
0
US
Hi,

I've got this line of code from an old database that I'm investigating but I don't know what it does?

DoCmd.DoMenuItem acFormBar, acEditMenu, 12, 2, acMenuVer70

I've looked in help and I know that the 12 and 2 are the commands which you can find by looking in the Command argument list. How can I find the argument list? Can anyone help with the line above?
 
Hi All,

I'm really struggling with this, surely someone knows what it does or how to find out. Please help.

Thanks

MJCoxy
 
As a guess, I think 12 = acRefresh, but I am less than certain.
However, the microsoft help file suggests the meaning can be worked out by counting down the menu, starting at 0. This way, you might be able to work out what these numbers mean... James Goodman
 
Thanks for that James but where can I get the Command Argument List from?

Through the rest of the code which I didn't supply I thought that it would refresh the recordset, but how did you get to that assumption, I cant see any way from the edit menu you can get to refresh on the Records menu using 12, 2.

Please someone come back with any ideas.
 
I entered DoMenuItem in code, highlighted it, & then pressed F1. This gave an explanation of the DoMenuItem method, along with some of the intrinsic contstants..

(Using AccessXP Developer)

James Goodman
 
I am not sure if I can help you. I have Access 2000. It would help to see all of the code.

First: The docmd.DoMenuItem is this.
DoMenuItem(MenuBar, MenuName, Command, [Subcommand], Version)

Second: Your Code:
DoCmd.DoMenuItem acFormBar, acEditMenu, 12, 2, acMenuVer70

I don't have Access 97, that is why it is hard for me to give you an exact answer.
It is the Edit for sure.
The 12 is actually the 13th command (it starts with 0)
Since the 2 is there, that means it has a subcommand. We know that it needs a subcommand, and there isn't very many that have that.
I would guess it is trying to GoTo the next record.

Let me know if you need more help!!

Bocker
 
I don't how much this might help but DoCmd.DoMenuItem was replaced in Access 97 by DoCmd.RunCommand. If you look in the help under RunCommand Method it lists all of its methods.

I hope this at least stears you in the right direction
 
My problem helping with Access 2000 is not the runcommand, but is the edit on the menubar. I don't know if 97 & 2000 are the same for selections.
 
i just tried running the command, & apparently this particular command is GotoNextRecord... James Goodman
 
Oops, that should have been RecordsGotoNext. Its equivilent using the RunCommand method is DoCmd.RunCommand acCmdRecordsGotoNext


HTH James Goodman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top