GregDataReno
Member
- Local time
 - Tomorrow, 01:36
 
- Joined
 - Jul 4, 2016
 
- Messages
 - 41
 
Weird.
Scenario:
I've tried variations on ListBox methods without success -- the same problem occurs if I step through all ListBox records and test only for selected items.
Each time I open the form, the first call fails, then all subsequent calls succeed.
Very annoying.
Advice most welcome
Greg
365/Access 64bit
 Scenario:
- I have a multiselect ListBox on a form.
 - I open the form and select one item in the list box and run code.
 - The code iterates over the listbox to build a concatenated string of selected items
 - The loop only looks at the collection of selected items ie. "for each variant item in the listbox.ItemsSelected"
 
- Open the form and the first call of the, the code confirms one item is selected - it enters the loop but the list.ItemsSelected(varItem) returns NULL
 - Keeping the form open and run the call again and the code works fine.
 
- the second call to the code - with no change to the list - now enters the loop AND returns the selected item
 
I've tried variations on ListBox methods without success -- the same problem occurs if I step through all ListBox records and test only for selected items.
Each time I open the form, the first call fails, then all subsequent calls succeed.
Very annoying.
Advice most welcome
Greg
365/Access 64bit