DoCmd.RunCommand acCmdDeleteRecord Problem in A2007

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Wayne

    DoCmd.RunCommand acCmdDeleteRecord Problem in A2007

    I've noticed a behaviour in A2007 that doesn't appear in A2003. The
    problem is appearing in a native A2007 database and an A2003 database
    running in A2007. If I press a command button to delete a record on a
    single form using DoCmd.RunComman d acCmdDeleteReco rd as the code
    behind the button, when I close that form Access asks me if I want to
    save the changes to the form.

    This only happens if the database is an mdb or accdb. If it has been
    compiled into an mde or accde the problem doesn't manifest. Why would
    this be happening?
  • ARC

    #2
    Re: DoCmd.RunComman d acCmdDeleteReco rd Problem in A2007

    I've seen this a lot in a2007. It does not happen in a .accdr file, by the
    way. I had to change lots of code on my close commands, where I first do a
    save record, then I do a:

    docmd.close acForm, "FormName",acSa veNo

    Then the message doesn't appear. However, if you have subforms, you'll get
    save messages for the subforms as well. So I made a blank subform, and prior
    to the docmd.close statement, I'll put something like:

    forms!Customer! subform.sourceo bject = "subBlank", where subBlank is the
    blank subform. Not sure why access 2007 does this, however.

    Andy
    "Wayne" <cqdigital@volc anomail.comwrot e in message
    news:690cef0d-ddab-4e32-8848-9f6c71b9714e@s1 3g2000prd.googl egroups.com...
    I've noticed a behaviour in A2007 that doesn't appear in A2003. The
    problem is appearing in a native A2007 database and an A2003 database
    running in A2007. If I press a command button to delete a record on a
    single form using DoCmd.RunComman d acCmdDeleteReco rd as the code
    behind the button, when I close that form Access asks me if I want to
    save the changes to the form.
    >
    This only happens if the database is an mdb or accdb. If it has been
    compiled into an mde or accde the problem doesn't manifest. Why would
    this be happening?

    Comment

    • Wayne

      #3
      Re: DoCmd.RunComman d acCmdDeleteReco rd Problem in A2007

      On Mar 8, 9:11 am, "ARC" <PCES...@PCESof t.invalidwrote:
      I've seen this a lot in a2007. It does not happen in a .accdr file, by the
      way. I had to change lots of code on my close commands, where I first do a
      save record, then I do a:
      >
      docmd.close acForm, "FormName",acSa veNo
      Thanks.

      Comment

      Working...