K
Kevin
i am trying to delete an item from a list box by clicking on a
button. It's not working, obviously but the problem is that I dont
know why. I have this same code for list box 1 and it works just
fine. this one errors out on rst.delete with runtime 3021 : no
current record. What am i doing wrong??
Private Sub Command3_Click()
'delete from list box2
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("SELECT * FROM account WHERE
'account type' = '" & Me.list2 & "'")
rst.Delete
Me.list2.Requery
End Sub
button. It's not working, obviously but the problem is that I dont
know why. I have this same code for list box 1 and it works just
fine. this one errors out on rst.delete with runtime 3021 : no
current record. What am i doing wrong??
Private Sub Command3_Click()
'delete from list box2
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("SELECT * FROM account WHERE
'account type' = '" & Me.list2 & "'")
rst.Delete
Me.list2.Requery
End Sub