dbTalk Databases Forums  

DoCmd.RunCommand acCmdDeleteRecord Problem in A2007

comp.databases.ms-access comp.databases.ms-access


Discuss DoCmd.RunCommand acCmdDeleteRecord Problem in A2007 in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Wayne
 
Posts: n/a

Default DoCmd.RunCommand acCmdDeleteRecord Problem in A2007 - 03-07-2008 , 03:51 PM






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.RunCommand acCmdDeleteRecord 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?

Reply With Quote
  #2  
Old   
ARC
 
Posts: n/a

Default Re: DoCmd.RunCommand acCmdDeleteRecord Problem in A2007 - 03-07-2008 , 05:11 PM






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",acSaveNo

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.sourceobject = "subBlank", where subBlank is the
blank subform. Not sure why access 2007 does this, however.

Andy
"Wayne" <cqdigital (AT) volcanomail (DOT) com> wrote

Quote:
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.RunCommand acCmdDeleteRecord 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?


Reply With Quote
  #3  
Old   
Wayne
 
Posts: n/a

Default Re: DoCmd.RunCommand acCmdDeleteRecord Problem in A2007 - 03-07-2008 , 07:24 PM



On Mar 8, 9:11*am, "ARC" <PCES... (AT) PCESoft (DOT) invalid> wrote:
Quote:
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",acSaveNo
Thanks.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.