hi,
I've a problem with this little code, I can't understand:
Option Compare Database
Dim numeriSchede As Variant
Dim DbCurr As DAO.Database
Dim tabella As DAO.Recordset
Private Sub Delete_Click()
Dim stringa As String
Set DbCurr = CurrentDb
Set tabella = DbCurr.OpenRecordset("Scheda Inserimento")
For Each numeriSchede In Scheda.ItemsSelected
stringa = Str(Scheda.ItemData(numeriSchede))
tabella.FindFirst "Numero Scheda = " & stringa
tabella.Delete
Next
Set DbCurr = Nothing
Set tabella = Nothing
End Sub
When a run this code it says:
run-time error '3251'

I've a problem with this little code, I can't understand:
Option Compare Database
Dim numeriSchede As Variant
Dim DbCurr As DAO.Database
Dim tabella As DAO.Recordset
Private Sub Delete_Click()
Dim stringa As String
Set DbCurr = CurrentDb
Set tabella = DbCurr.OpenRecordset("Scheda Inserimento")
For Each numeriSchede In Scheda.ItemsSelected
stringa = Str(Scheda.ItemData(numeriSchede))
tabella.FindFirst "Numero Scheda = " & stringa
tabella.Delete
Next
Set DbCurr = Nothing
Set tabella = Nothing
End Sub
When a run this code it says:
run-time error '3251'



