473,656 Members | 2,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Update or CancelUpdate without AddNew or Edit Error

I have a form that has the navigation buttons enabled. I have a
procedure that runs every time a new record is loaded (Current Event).
This procedure performs a SELECT from a table (different from the one
that serves as a source to the form) so that I can prepopulate the
values of an unbound list box. I am getting this error:
Update or CancelUpdate without AddNew or Edit

Please help.

Thanks
Nov 12 '05 #1
2 14169
JSMiami wrote:
I have a form that has the navigation buttons enabled. I have a
procedure that runs every time a new record is loaded (Current Event).
This procedure performs a SELECT from a table (different from the one
that serves as a source to the form) so that I can prepopulate the
values of an unbound list box. I am getting this error:
Update or CancelUpdate without AddNew or Edit

Please help.

Thanks


I had a similar problem earlier. I added the code line
msgbox "Dirty " & Me.Dirty
into the OnCurrent event. Sure enough, something I had done had set the
code to dirty. So I removed that line and entered
If Me.Dirty then DOcmd.RunComman d accmdsaverecord
in the OnCurrent event and the error went away.
Nov 12 '05 #2
It worked but I'm not sure why. I didn't remove any code as you
indicated but I did add the code mentioned. Very weird but I
appreciate the response. Thanks!
Salad <oi*@vinegar.co m> wrote in message news:<T_******* ***********@new sread1.news.pas .earthlink.net> ...
JSMiami wrote:
I have a form that has the navigation buttons enabled. I have a
procedure that runs every time a new record is loaded (Current Event).
This procedure performs a SELECT from a table (different from the one
that serves as a source to the form) so that I can prepopulate the
values of an unbound list box. I am getting this error:
Update or CancelUpdate without AddNew or Edit

Please help.

Thanks


I had a similar problem earlier. I added the code line
msgbox "Dirty " & Me.Dirty
into the OnCurrent event. Sure enough, something I had done had set the
code to dirty. So I removed that line and entered
If Me.Dirty then DOcmd.RunComman d accmdsaverecord
in the OnCurrent event and the error went away.

Nov 12 '05 #3

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

Similar topics

0
3916
by: Trevor Best | last post by:
Access 2002 MDB -> SQL Server 2000 - ODBC Linked tables. B4 we start, this is not occurring in a recordset operation and yes I googled, even found my own fix, which I already use (http://tinyurl.com/2e8os) but in one particular form it's getting worse, sometimes accompanied by a "Another user has modified the data" or something or that the form's values have reverted back to their old values before my workaround in the Form_Error event...
2
388
by: JSMiami | last post by:
I have a form that has the navigation buttons enabled. I have a procedure that runs every time a new record is loaded (Current Event). This procedure performs a SELECT from a table (different from the one that serves as a source to the form) so that I can prepopulate the values of an unbound list box. I am getting this error: Update or CancelUpdate without AddNew or Edit Please help. Thanks
0
2863
by: crispywafers | last post by:
Hi, Hope someone can help me out. I have a piece of code I use to update a subforms numbers (Trimester Invoices) if the mainform numbers (School Year Order) change. What is interesting is the code works if I type numbers into the mainform once, but if you accidently mistype something and go back immediately to reenter the number into the same field you get this "update or cancelupdate without addnew or edit" error.
4
1873
by: paulwilliamsonremove | last post by:
Hi, I Googled the subject and couldn't find solution (DoCmd Save.... didn't work). I tried this code in the Form's Open and Load. I am just trying to populate UNBOUND fields on a form. I get the error when closing out the form. None of the fields that I am populating on the form are bound to a table (except for
9
7743
bhcob1
by: bhcob1 | last post by:
Hey guys, 'Update or CancelUpdate without AddNew or Edit' On my database i keep occasionly get this error when i try and edit a field, it is not everytime. It will be working fine and then this error appears. I will be editing records and then a random one will get the error. A bit of background on my form, this will seem a bit lengthy but here is my code. The form has a navigation list which the user can select a record to view. An...
9
2616
anastasius
by: anastasius | last post by:
I have read other posts with a similar problem but I have not read of one like this. When a user selects a name from the drop-down list called "cboLastName" (which is unbound and whose RowSourceType is "Table/Query" and RowSource is a SELECT statement, the following event handler is executed: Sub cboLastName_AfterUpdate() Me.RecordsetClone.FindFirst " = '" & Me! & "'" Me.Bookmark = Me.RecordsetClone.Bookmark cboLastName =...
5
3536
by: Prajaktaj | last post by:
Hi All, I want to update the registry. I have administrative rights so it works fine. But if i login as a normal user and not as an admin then it gives me an error as i dont have enough previleges. Please tell me that can i update registry without having administrative rights? Thanks for any help.
1
3572
by: w.l.fischer | last post by:
Hi, the following sequence: set current explain mode yes; set current explain snapshot yes; update ...; set current explain mode no;
0
8296
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8710
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8497
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8598
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2721
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1928
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.