Re: Run-time error '3197'

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"Brian" <Brian@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:2CD0CBE9-5834-4F51-B2C5-B5A8C82CA8F2@xxxxxxxxxxxxxxxx
For better or worse, my forms are not directly linked to underlying tables.
Instead, I copy the data from the table to the form where it can be modified
by the user. Then I copy the now modified data back to the table using VBA
and .edit and .update.

I am in the process of creating a new table and database. Whenever I try to
save the data back to the table, it works for about 3-4 times, and then I get
the following error:

Run-time error '3197'
The Microsoft Access database engine stopped the process
because you and another user are attempting to change the same
data at the same time.

When I click the 'Help' button, it tells me:
-------------------------------------------------
This error can occur in a multiuser environment.

Another user has changed the data you are trying to update. This error can
occur when multiple users open a table or create a Recordset and use
optimistic locking. Between the time you used the Edit method and the Update
method, another user changed the same data.

To overwrite the other user's changes with your own, execute the Update
method again.
-------------------------------------------------

The problem is that since the database is in development, there are no other
users. Furthermore, the only thing that is occurring between the Edit and
Update methods are 12 lines of :

rst![rel_EdCess] = Forms![frmPurchaseOrderHeader-DataEntry]![rel_EdCess]

each line with different fields of course.

If anyone can point me in the right direction, I would sure appreciate it!


How local is your recordset usage? When you load your form, do you open, read, and close the recordset, or do you leave the recordset open? When you unload the form, do you open, update, and close the recordset?

My best guess is that there is a recordset that isn't being closed.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

.


Quantcast