snicker
Registered User.
- Local time
- Today, 20:43
- Joined
- Aug 8, 2003
- Messages
- 91
I am tring to delete a record of a sale and add that Item back into inventory. this is the code I'm using.
Option Compare Database
Private Sub Delete_Click()
On Error GoTo Err_Delete_Click
RunSQL "UPDATE DISTINCTROW Products, ProductsSold SET Products.Stock = [Stock]+Forms!EditPrice!EditPriceProductsSub.Form!Ammount WHERE (((Products.ItemNum)=Forms!EditPrice!EditPriceProductsSub.Form!Combo2));"
DoCmd.RunCommand acCmdDeleteRecord
Exit_Delete_Click:
Exit Sub
Err_Delete_Click:
MsgBox Err.Description
Resume Exit_Delete_Click
End Sub
I an error message, not every time, only when I make a change to the code,
This Operation is not supported within transactions.
I've tried everything I can think of, even macros. I cant really figure out print.debug so I dont know what my next step would be. Any suggestions.
Thx Mike
Option Compare Database
Private Sub Delete_Click()
On Error GoTo Err_Delete_Click
RunSQL "UPDATE DISTINCTROW Products, ProductsSold SET Products.Stock = [Stock]+Forms!EditPrice!EditPriceProductsSub.Form!Ammount WHERE (((Products.ItemNum)=Forms!EditPrice!EditPriceProductsSub.Form!Combo2));"
DoCmd.RunCommand acCmdDeleteRecord
Exit_Delete_Click:
Exit Sub
Err_Delete_Click:
MsgBox Err.Description
Resume Exit_Delete_Click
End Sub
I an error message, not every time, only when I make a change to the code,
This Operation is not supported within transactions.
I've tried everything I can think of, even macros. I cant really figure out print.debug so I dont know what my next step would be. Any suggestions.
Thx Mike