Hi,
in appendix is .mdb file with this thema.
Inside you can find one form with listbox (with multi selecting ability).
Result is this one :
1) If I delete only one item in list, it is ok. I can do it again and again and
it is working fine.
BUT
2) If I delete more items in list at once, it is ok - but if I will try to
do it again then there is an error because .ItemData(i) value is Null.
I dont understand why???
Can anyone hlep me with it? Thank you
Jiri
in appendix is .mdb file with this thema.
Inside you can find one form with listbox (with multi selecting ability).
Code:
I use this code :
Dim strSQL As String
Dim i As Variant
With Me.se1
For Each i In .ItemsSelected
SQL = "DELETE '*' FROM [t1] WHERE [id] = " & .ItemData(i) & " ;"
CurrentDb.Execute (SQL)
Next
End With
Me.se1.Requery
Result is this one :
1) If I delete only one item in list, it is ok. I can do it again and again and
it is working fine.
BUT
2) If I delete more items in list at once, it is ok - but if I will try to
do it again then there is an error because .ItemData(i) value is Null.
I dont understand why???
Can anyone hlep me with it? Thank you
Jiri