paparingos7
New member
- Local time
- Today, 12:42
- Joined
- Sep 8, 2010
- Messages
- 4
Hi all,
I've got a listbox on a form which is enabled for multiple selection (Multi Select = Extended).
Row Source Type: Table/Query
Row Source: query whose SQL I manipulate in VBA (the idea is to only show the relevant values based on the other selections on the form, namely 5 combo boxes)
The problem I have is that when the form is refreshed when VBA is running (Me.Refresh), the listbox appears to lose any previously selected values.
I've bypassed this by storing the selected values of the listbox in an array and then restoring them to the (now empty) listbox after the form is refreshed.
This seems too much of a fiddle - can you think of a way to force the listbox to hold on to its selected values even if the form is refreshed (please assume that the form needs to get refreshed).
Many thanks.
I've got a listbox on a form which is enabled for multiple selection (Multi Select = Extended).
Row Source Type: Table/Query
Row Source: query whose SQL I manipulate in VBA (the idea is to only show the relevant values based on the other selections on the form, namely 5 combo boxes)
The problem I have is that when the form is refreshed when VBA is running (Me.Refresh), the listbox appears to lose any previously selected values.
I've bypassed this by storing the selected values of the listbox in an array and then restoring them to the (now empty) listbox after the form is refreshed.
This seems too much of a fiddle - can you think of a way to force the listbox to hold on to its selected values even if the form is refreshed (please assume that the form needs to get refreshed).
Many thanks.