If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Update or CancelUpdate without AddNew or Edit
In Access 2000 SP3 I have a form that displays a record in the table
associated with the form. There is no DAO or ADO code to open a record set. I have a listbox on the form that loads information from another table. There is a button on the form that loads a report. The report does display the record currently open on the form as well as records from other tables. Here's the problem: 1) If I click on the listbox (no other action, no code executed in the OnClick event handler), then load the report, then close the report, then close the form I get the 3020 error: "Update or CancelUpdate without AddNew or Edit". 2) I do NOT get this message if I open the form, run the report, and close the form. I do NOT get the message if I open the form, click on the list boc, and close the form. In fact, I only get this message if I do the things I listed in that exact order. I know all about needing to open a record set and executing the AddNew or Edit method before modifying or inserting a record - but I'm not opening a recordset in code. The listbox popuylates itself with a simple query of another table and it has no code (it extracts a value from the list when double-clicked and opens another form then, but this problem occurs on a single-click that executes no code!) Any help would be appreciated! Thanks in advance Brad Marshall |
#2
|
|||
|
|||
Update or CancelUpdate without AddNew or Edit
Brad:
Posting your question once will get you all the response you need. Please do not post multiple copies of the same message in different groups. This wastes the time of more than one person. Rick B "Brad Marshall" wrote in message ... In Access 2000 SP3 I have a form that displays a record in the table associated with the form. There is no DAO or ADO code to open a record set. I have a listbox on the form that loads information from another table. There is a button on the form that loads a report. The report does display the record currently open on the form as well as records from other tables. Here's the problem: 1) If I click on the listbox (no other action, no code executed in the OnClick event handler), then load the report, then close the report, then close the form I get the 3020 error: "Update or CancelUpdate without AddNew or Edit". 2) I do NOT get this message if I open the form, run the report, and close the form. I do NOT get the message if I open the form, click on the list boc, and close the form. In fact, I only get this message if I do the things I listed in that exact order. I know all about needing to open a record set and executing the AddNew or Edit method before modifying or inserting a record - but I'm not opening a recordset in code. The listbox popuylates itself with a simple query of another table and it has no code (it extracts a value from the list when double-clicked and opens another form then, but this problem occurs on a single-click that executes no code!) Any help would be appreciated! Thanks in advance Brad Marshall |
#3
|
|||
|
|||
Update or CancelUpdate without AddNew or Edit
My appologies. I have no desire to waster anyone's time - I'm always
grateful for the help I get from these groups. Brad "Rick B" wrote in message ... Brad: Posting your question once will get you all the response you need. Please do not post multiple copies of the same message in different groups. This wastes the time of more than one person. Rick B "Brad Marshall" wrote in message ... In Access 2000 SP3 I have a form that displays a record in the table associated with the form. There is no DAO or ADO code to open a record set. I have a listbox on the form that loads information from another table. There is a button on the form that loads a report. The report does display the record currently open on the form as well as records from other tables. Here's the problem: 1) If I click on the listbox (no other action, no code executed in the OnClick event handler), then load the report, then close the report, then close the form I get the 3020 error: "Update or CancelUpdate without AddNew or Edit". 2) I do NOT get this message if I open the form, run the report, and close the form. I do NOT get the message if I open the form, click on the list boc, and close the form. In fact, I only get this message if I do the things I listed in that exact order. I know all about needing to open a record set and executing the AddNew or Edit method before modifying or inserting a record - but I'm not opening a recordset in code. The listbox popuylates itself with a simple query of another table and it has no code (it extracts a value from the list when double-clicked and opens another form then, but this problem occurs on a single-click that executes no code!) Any help would be appreciated! Thanks in advance Brad Marshall |
#4
|
|||
|
|||
Update or CancelUpdate without AddNew or Edit
Hi Brad:
I've encountered this very problem with one of my forms... the only thing that I see could be the problem is that the OnTimer event is trying to close the form early. Unfortunately, when I try to recreate the error, it doesn't seem to occur. I've since done the following: 1) Every field that I finish updating gets immediately refreshed (this has forced the error the other day). 2) When I click on the tab that has the subform I make sure to turn off the OnTimer event. Regards, Al "Brad Marshall" wrote in message ... My appologies. I have no desire to waster anyone's time - I'm always grateful for the help I get from these groups. Brad "Rick B" wrote in message ... Brad: Posting your question once will get you all the response you need. Please do not post multiple copies of the same message in different groups. This wastes the time of more than one person. Rick B "Brad Marshall" wrote in message ... In Access 2000 SP3 I have a form that displays a record in the table associated with the form. There is no DAO or ADO code to open a record set. I have a listbox on the form that loads information from another table. There is a button on the form that loads a report. The report does display the record currently open on the form as well as records from other tables. Here's the problem: 1) If I click on the listbox (no other action, no code executed in the OnClick event handler), then load the report, then close the report, then close the form I get the 3020 error: "Update or CancelUpdate without AddNew or Edit". 2) I do NOT get this message if I open the form, run the report, and close the form. I do NOT get the message if I open the form, click on the list boc, and close the form. In fact, I only get this message if I do the things I listed in that exact order. I know all about needing to open a record set and executing the AddNew or Edit method before modifying or inserting a record - but I'm not opening a recordset in code. The listbox popuylates itself with a simple query of another table and it has no code (it extracts a value from the list when double-clicked and opens another form then, but this problem occurs on a single-click that executes no code!) Any help would be appreciated! Thanks in advance Brad Marshall |
#5
|
|||
|
|||
Update or CancelUpdate without AddNew or Edit
Thanks, Al, but I solved the problem and it is bizzare. It would be great
if Microsoft had published more about the 3020 error. Here's what I discovered: 1) In my scenario, the problem only occurs it I a) open the problem form; 2) click on a benign list box on the form; c) open a report; d) close the report; e) close the form. 2) Before opening the report I did a Requery to save any changes to data on the form in the current record, as these data appear on the report. - I wanted the report to show any changes that had not explicitly been saved on the form; a legitimate forced-save of user changes in this business process. 3) I changed the Requery to a Regresh and everything now works. Why? "Al Borges" alborgmd at yahoo dot com wrote in message ... Hi Brad: I've encountered this very problem with one of my forms... the only thing that I see could be the problem is that the OnTimer event is trying to close the form early. Unfortunately, when I try to recreate the error, it doesn't seem to occur. I've since done the following: 1) Every field that I finish updating gets immediately refreshed (this has forced the error the other day). 2) When I click on the tab that has the subform I make sure to turn off the OnTimer event. Regards, Al "Brad Marshall" wrote in message ... My appologies. I have no desire to waster anyone's time - I'm always grateful for the help I get from these groups. Brad "Rick B" wrote in message ... Brad: Posting your question once will get you all the response you need. Please do not post multiple copies of the same message in different groups. This wastes the time of more than one person. Rick B "Brad Marshall" wrote in message ... In Access 2000 SP3 I have a form that displays a record in the table associated with the form. There is no DAO or ADO code to open a record set. I have a listbox on the form that loads information from another table. There is a button on the form that loads a report. The report does display the record currently open on the form as well as records from other tables. Here's the problem: 1) If I click on the listbox (no other action, no code executed in the OnClick event handler), then load the report, then close the report, then close the form I get the 3020 error: "Update or CancelUpdate without AddNew or Edit". 2) I do NOT get this message if I open the form, run the report, and close the form. I do NOT get the message if I open the form, click on the list boc, and close the form. In fact, I only get this message if I do the things I listed in that exact order. I know all about needing to open a record set and executing the AddNew or Edit method before modifying or inserting a record - but I'm not opening a recordset in code. The listbox popuylates itself with a simple query of another table and it has no code (it extracts a value from the list when double-clicked and opens another form then, but this problem occurs on a single-click that executes no code!) Any help would be appreciated! Thanks in advance Brad Marshall |
#6
|
|||
|
|||
Update or CancelUpdate without AddNew or Edit
Hi Brad:
Great! I think I got my problem solved too... today while using my SOAP notes form the form still called up the OnTimer event, even though programmatically it shouldn't of, but it didn't cause an error... it simply saved my data and closed the form. I was able to get back into it without any lost data. I'll need to now work further on the OnTimer event... not the bug. Regards, Al "Brad Marshall" wrote in message ... Thanks, Al, but I solved the problem and it is bizzare. It would be great if Microsoft had published more about the 3020 error. Here's what I discovered: 1) In my scenario, the problem only occurs it I a) open the problem form; 2) click on a benign list box on the form; c) open a report; d) close the report; e) close the form. 2) Before opening the report I did a Requery to save any changes to data on the form in the current record, as these data appear on the report. - I wanted the report to show any changes that had not explicitly been saved on the form; a legitimate forced-save of user changes in this business process. 3) I changed the Requery to a Regresh and everything now works. Why? "Al Borges" alborgmd at yahoo dot com wrote in message ... Hi Brad: I've encountered this very problem with one of my forms... the only thing that I see could be the problem is that the OnTimer event is trying to close the form early. Unfortunately, when I try to recreate the error, it doesn't seem to occur. I've since done the following: 1) Every field that I finish updating gets immediately refreshed (this has forced the error the other day). 2) When I click on the tab that has the subform I make sure to turn off the OnTimer event. Regards, Al "Brad Marshall" wrote in message ... My appologies. I have no desire to waster anyone's time - I'm always grateful for the help I get from these groups. Brad "Rick B" wrote in message ... Brad: Posting your question once will get you all the response you need. Please do not post multiple copies of the same message in different groups. This wastes the time of more than one person. Rick B "Brad Marshall" wrote in message ... In Access 2000 SP3 I have a form that displays a record in the table associated with the form. There is no DAO or ADO code to open a record set. I have a listbox on the form that loads information from another table. There is a button on the form that loads a report. The report does display the record currently open on the form as well as records from other tables. Here's the problem: 1) If I click on the listbox (no other action, no code executed in the OnClick event handler), then load the report, then close the report, then close the form I get the 3020 error: "Update or CancelUpdate without AddNew or Edit". 2) I do NOT get this message if I open the form, run the report, and close the form. I do NOT get the message if I open the form, click on the list boc, and close the form. In fact, I only get this message if I do the things I listed in that exact order. I know all about needing to open a record set and executing the AddNew or Edit method before modifying or inserting a record - but I'm not opening a recordset in code. The listbox popuylates itself with a simple quer y of another table and it has no code (it extracts a value from the list when double-clicked and opens another form then, but this problem occurs on a single-click that executes no code!) Any help would be appreciated! Thanks in advance Brad Marshall |
Thread Tools | |
Display Modes | |
|
|