I am using a listbox to enable the user to select one or many entries via the multiselect option. The rowsource table contains a boolean value [blnSelected] that marks a record as either selected ot not selected. The question now is how to keep these two elements synchronized.
Stepping through all the records of the rowsource and settint the listbox.selected(currentrecord) to TRUE is no problem (happens on the current event of the form).
But two questions remain:
1. How do I know on which entry the user just clicked in the listbox?? Do I have to step through all rows and compare the selection with the table? Or is there some property like "the just clicked row"?
2. How do I reorder the listbox entries? I have several buttons above the listbox that should reorder the rowsource. In a continious form these buttons modified the OrderBy property of that form. However the listbox doesnt have such a property. Do I really have to append an "ORDER BY" to the rowsource sql?
Thanks in advance
waldemar
Stepping through all the records of the rowsource and settint the listbox.selected(currentrecord) to TRUE is no problem (happens on the current event of the form).
But two questions remain:
1. How do I know on which entry the user just clicked in the listbox?? Do I have to step through all rows and compare the selection with the table? Or is there some property like "the just clicked row"?
2. How do I reorder the listbox entries? I have several buttons above the listbox that should reorder the rowsource. In a continious form these buttons modified the OrderBy property of that form. However the listbox doesnt have such a property. Do I really have to append an "ORDER BY" to the rowsource sql?
Thanks in advance
waldemar