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

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70

Status
Not open for further replies.

jdegeorge

Programmer
Mar 19, 2002
1,313
US
I can't find an explanation in help, so I hope someone here knows...

I created a form and used the button wizard to create a delete button. The code behind the button is:

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

What does the "8" and "6" mean?

Thanks!

Jim DeGeorge [wavey]
 
Sorry to bother you all. I searched the site again and found a thread with a similar question.

8 deletes the record
6 selects the record (so you dont see a #Deleted message)

Thanks!

Jim DeGeorge [wavey]
 
In the help file apparently the 8 stands for the delete command, and the 6 stands for the copy command. What it is doing is going to the edit menu in Access and going down the list, starting at 0, to the delete command which is number 7 (the 8th command down the list). Same with the 6, it goes to the 6th command down the list. What it is copying I am not for sure. But if you want to take a look at it do an index search for the DoMenuItem Method.

If I take a peek in your Windows, to fix a problem, does that make me a "Peeping Tom"? Hmmmmmmmmmm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top