Unless you are using an old version of Access, you should change these to the newer RunCommand -- it's also a lot easier to understand.
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
becomes
RunCommand...