BennyLinton
Registered User.
- Local time
- Yesterday, 20:23
- Joined
- Feb 21, 2014
- Messages
- 263
I have a database (one of several with basically the same code and table structure) that I'm getting the "Cannot Delete from Specified Table" error. I've placed a breakpoint in my VBA and the string is being built properly with the correct record to delete (picking from a record in a gridview), but still the persistent error... thanks for any help all:
Private Sub cancelLine_Click()
DoCmd.SetWarnings False
Dim intLineIndex As Integer
intLineIndex = Me!cashBatchDetail.Form!indx
strDelLine = "Delete from dbo_cashBatchDetail Where indx = " & intLineIndex
DoCmd.RunSQL strDelLine
Form_cashBatchHeader.Refresh
End Sub
My debugger shows a correctly formatted sql:
""Delete from dbo_cashBatchDetail Where indx = 935"
Private Sub cancelLine_Click()
DoCmd.SetWarnings False
Dim intLineIndex As Integer
intLineIndex = Me!cashBatchDetail.Form!indx
strDelLine = "Delete from dbo_cashBatchDetail Where indx = " & intLineIndex
DoCmd.RunSQL strDelLine
Form_cashBatchHeader.Refresh
End Sub
My debugger shows a correctly formatted sql:
""Delete from dbo_cashBatchDetail Where indx = 935"