Dear all,
I would like to make a delete query, based on the multiple selections from a vbalgrid.
I know a way to do this with a listbox:
you just create an "IN-string". For example
dim strIN as string
dim i as integer
For i = 0 To lstList1.ListCount - 1
If lstList1.Selected(i) Then
strIN = strIN & lstList1.Column(0, i) & ","
End If
Next i
The created IN-string can than be used in an SQL-string.
I don't know how to do this with a grid. You can get the information from a column in the grid through '.rowselected'
or through 'vbalGrid1.CellText(vbalGrid1.SelectedRow, 1)',
But that only gives the information about the current selected row. Not the other rowes that are selected as well.
Does anybody know how to do this?
Thank you very much,
Dries
I would like to make a delete query, based on the multiple selections from a vbalgrid.
I know a way to do this with a listbox:
you just create an "IN-string". For example
dim strIN as string
dim i as integer
For i = 0 To lstList1.ListCount - 1
If lstList1.Selected(i) Then
strIN = strIN & lstList1.Column(0, i) & ","
End If
Next i
The created IN-string can than be used in an SQL-string.
I don't know how to do this with a grid. You can get the information from a column in the grid through '.rowselected'
or through 'vbalGrid1.CellText(vbalGrid1.SelectedRow, 1)',
But that only gives the information about the current selected row. Not the other rowes that are selected as well.
Does anybody know how to do this?
Thank you very much,
Dries