• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 634
  • Last Modified:

can't delete current record in ms access

i am trying to delete the current record on my form using the following code
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

I tried putting the code into a combo box event but it doesn't work.  When i use a command button with the code in the click event it works just fine.
0
pele4483
Asked:
pele4483
  • 2
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Use this:

DoCmd.RunCommand acCmdDeleteRecord

Those commands above are 13 year old deprecated commands.

mx
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
I'm AMAZED that the so called Wizard still generates 13 year old deprecated code!

mx
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now