How do I get the items selected from a datasheet? Does a datasheet support
multiple selections?
I know a ListBox has a "Selected" property that can be used when the
MultiSelect property is set - but is there a way to get the same
functionality with a datasheet?
If not, I'm throwing all my datasheets in the junk..... why bother with
datasheets? get all the same functionality with a listbox?
For example, with a ListBox, it might look something like this;
Dim varItem As Variant
Dim ctl As Control
Set ctl = frmMain!lstNames
For Each varItm In ctl.ItemsSelected
Debug.Print ctl.ItemData(varItm)
Next varItm
With a datasheet:
Dim ctl As Control
Set ctl = Forms!frmMain!frmInventory
For Each varItem In ctl.ItemData(varItem)
Debug.Print varItem
Next
does not work
Dim frm As Form
Set frm = Forms!frmMain!frmInventory.Form
For Each varItem in frm.?????
Debug.Print varItem
Next