ScrmingWhisprs
I <3 Coffee Milk.
- Local time
- Yesterday, 22:30
- Joined
- Jun 29, 2006
- Messages
- 156
Hi there.
Could someone please tell me what I'm doing wrong? I have the following code for a command button, which is supposed to delete the row in a table that matches the ID number selected in a listbox:
Instead of deleting that single row, it deletes everything in that table!!!
Please help!
Thanks
ScrmingWhisprs
Could someone please tell me what I'm doing wrong? I have the following code for a command button, which is supposed to delete the row in a table that matches the ID number selected in a listbox:
Code:
Private Sub cmdRemoveQueue_Click()
Dim SQL As String
Dim bID As String
bID = Me.lboPrintQueue.Column(0)
SQL = "DELETE tblIDBatchPrint.bID " & _
"FROM tblIDBatchPrint " & _
"WHERE 'tblIDBatchPrint.bID = ' & bID;"
DoCmd.RunSQL SQL
Me.lboPrintQueue.Requery
End Sub
Instead of deleting that single row, it deletes everything in that table!!!
Please help!
Thanks
ScrmingWhisprs