473,395 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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.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?
Mar 7 '08 #1
2 4357
ARC
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" <cq*******@volcanomail.comwrote in message
news:69**********************************@s13g2000 prd.googlegroups.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.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?
Mar 7 '08 #2
On Mar 8, 9:11*am, "ARC" <PCES...@PCESoft.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",acSaveNo
Thanks.
Mar 8 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Eric | last post by:
What's the best way to cancel the new record when doCmd.GoToRecord , , acNewRec is executed and before the new record is actually written to the database. I'm maintaining an existing Access 97...
2
by: Salad | last post by:
A97. I have a command button to save and exit. I had the code If Me.Dirty Then Docmd.RunCommand acCmdSaveRecord ...more code endif I was getting an error because a value was not getting...
0
by: Mike MacSween | last post by:
The user did this, she said. Changed a value in a drop down list (which will have changed an integer value in a field in the main table which is a FK), and edited some text in a text box. Then...
6
by: Squirrel | last post by:
I have a command button on a subform to delete a record. The only statement in the subroutine is: DoCmd.RunCommand acCmdDeleteRecord The subform's recordsource is "select * from tblVisit order...
4
by: WJA | last post by:
I'm probably missing something here but I can't understand the following. When 2 users try to save a record with the same primary key (a number field), the first record saves as expected, but the...
2
by: deko | last post by:
I'm trying to expand a popup form and make additional controls available by making the form footer visible and resizing the form. This works: Me.FormFooter.Visible = Me!tglAdvanced.Value...
0
by: MLH | last post by:
Running the following procedure, Access 97 is giving me a 2465 error in line #250. Anyone know why? MySQL is a global var in the app. This is running in frmVehicleChooserForm. Private Sub...
2
by: Coolboy55 | last post by:
Hi, I'm using the Form_Dirty event to run DoCmd.RunCommand acCmdSaveRecord, but it does not appear to be working, although the event does trigger. I want the record on the main form to be saved...
5
by: Lebbsy | last post by:
After displaying search results, I want to be able to double click the identity number field and then the input form SubmissionDetails becomes the display form for the results of the data matching...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.