Update or CancelUpdate without AddNew

B

Brad Marshall

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
(e-mail address removed)
 
R

Rick B

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


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
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top