I am toying with Base but am stuck on how to set the ListSource of a ListBox with an array of values rather than data from a query.
Any help would be appreciated.
I am toying with Base but am stuck on how to set the ListSource of a ListBox with an array of values rather than data from a query.
Any help would be appreciated.
To add entries manually, edit the form and create a new list box. Right-click on the control and choose Control
. At General
tab of control properties window, edit List entries
property: add the first item, press Shift+Enter, and then add another item.
From How to Programmatically add or remove items in ListBox FORM control, @Lyrl writes:
The listbox array content is clunky; it's actually easier to work with if the form is connected to a Base file and the listbox content is determined by an SQL string.
That page also shows macro code to populate the list with an array of values.
oListBox.StringItemList() = Array("One", "Two", "Three")