Error code 3197

G

Guest

I am getting the following message when attempting to delete a record in my
table. I am using access as my front end and sql 2000 as the back-end. No
other users are connected to this table when running the code.

Any suggestions as to the cause are appreciated.

ERROR MESSAGE:

The Microsoft Jet database engine stopped the process because you and
another user are attempting to change the same data at the same time. (Error
3197)

MY CODE:

Set rs = DB.OpenRecordset("Select * from tbl_wo_invoice Where wo_Id = " &
Me.wo_id & " AND (wo_billing_option = 2 Or wo_billing_option = 4) And
(inv_approved = -1) And booked = 0", dbOpenDynaset, dbSeeChanges)
If rs.EOF Then
MsgBox "Cannot post expenses to this work order."
Exit Sub
Else
bPostingExpenses = True
curSellPrice = rs!wo_selling_price
rs.Delete (THIS IS WHERE I GET THE ERROR CODE)
BuildInvoice True
End If
rs.Close
 
G

Graham R Seach

Owen,

I'll bet your form is based on tbl_wo_invoice! If that's the case, then the
error message is accurate; another user (you) ar etrying to change data that
the form already has in its recordset.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
G

Guest

That is not the case. The form is based on a completely different table. I
was able to work arround this issue by modifying my code from (Select *) to
(Select wo_id) for what ever reason this works.

I cannot begin to explain why though.
 

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