Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update or Cancel Update without Addnew or Edit

Status
Not open for further replies.

cyberbob999

Technical User
Jun 26, 2003
23
US
I *think* I understand the nature of this error--if I'm using a dao/ado recordset and I try to update it without using the addnew or edit method beforehand...

Well, I do use two different dao recordsets in my project; however, both are read only (for data display only--neither is ever updated or edited). Completely independent of these recordsets is my main form, which contains fields that are bound to a single table (tblPersonal).

I filter the records using me.recordsource = "sql statement" (where, again, I am using the tblPersonal table)

At seemingly random times during editing of these fields, I get the "Update or Cancel Update without Addnew or Edit" error message. Not only is the timing random, but the field that I am updating at the time is random. After I update the field (i.e. when the afterupdate event would normally run) I get the error. I am then locked in to that field and cannot even enter design mode because every time I try to click on anything else, I get the error. I am forced to close the application and then re-open it (after losing whatever data I tried to enter). I can then update the field that previously caused me problems and no further errors are generated.

Any thoughts on what I might be doing wrong? I've tried reproducing the error by repeating the steps that caused it the previous time with no success. It really does seem random :(

I am using Office XP and writing the application in Access 2000 (I have ran the database on an Office2000 machine and experienced the same error).
 
Open a new recordset dynamic under a cmd button and add a new rec and close it. Then you form may need a requery to get new data from the table.

rollie@bwsys.net
 
Rolliee:

I'm not sure you understand my problem (or I don't understand your solution, perhaps). I'm not trying to add a new record... I only open the recordsets to display data from the underlying table--I don't even wish to edit the data in the recordsets. The data I'm editing is not in a recordset, but rather the recordsource for my form...
 
The recordsource of your form is a recordset and does have an underelyin table. You must uses edit, even if you do not addNew, to change anything.

rollie@bwsys.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top