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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Time Error 3188

Status
Not open for further replies.

DevelopV

Technical User
Mar 16, 2012
113
ZA
I have the table "tblCustomerOrderProduct". Its primary key is the field "CustomerOrderProductId"

When I delete a record, from a form, I have certain instances when I need to delete an additional record in the same table.
I know the value of "CustomerOrderProductId" for the additional record I wish to delete.

To delete the additional record I use:
DoCmd.RunSQL "Delete * from tblCustomerOrderProduct where CustomerOrderProductId = " & CustomerOrderProductIdToDelete

I get the run time error 3188 - could not Update; Currently locked by another session on this machine.

I do I troubleshoot this?
It is interesting that I can add records but cannot delete!
 
DevelopV . . .

I see your using [blue]Docmd.RunSQL[/blue] ... (disregard my prior post). Can you reveal the rest of the delete code?

Also ... is [blue]CustomerOrderProductId[purple]ToDelete[/purple][/blue] actually another field or just descriptive?

[blue]Your Thoughts? . . .[/blue]

See Ya . . .

Be sure to see FAQ219-2884 Worthy Reading! [thumbsup2]
Also FAQ181-2886 Worthy Reading! [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top