shabbaranks
Registered User.
- Local time
- Today, 07:29
- Joined
- Oct 17, 2011
- Messages
- 300
Hi chaps,
Upon the results which populate my list box what I am trying to do is allow the user to select various values from the list box and then hit a button which deletes the values from the table. My code is currently:
But it doesn't delete, infact it doesn't do anything. The list box values are still in the list box and if I look in the table they are still there also.
Any suggestions please? Thanks as always
Upon the results which populate my list box what I am trying to do is allow the user to select various values from the list box and then hit a button which deletes the values from the table. My code is currently:
Code:
Private Sub Del_TsCorrection_tbox_Click()
Dim lngID As Long
Dim strSQL As String
If IsNull(Me.TSCorrection_listbx) Then
Exit Sub
End If
lngID = Me.TSCorrection_listbx.Value
strSQL = "DELETE * FROM TSTable WHERE ID = " & lngID
CurrentDb.Execute strSQL
Me.TSCorrection_listbx.Requery
End Sub
But it doesn't delete, infact it doesn't do anything. The list box values are still in the list box and if I look in the table they are still there also.
Any suggestions please? Thanks as always