I created a multi-select listbox which I populate with “distinct” furnace names that have been entered into an inspection table. The end user has the option to delete records from the inspection table. The listbox gives the end user the option to filter results on a sub-form, nothing more. When the last record relating to a specific furnace is deleted; the multi-select listbox removes that furnace name.
The problem is the row where the old furnace name existed is still highlighted, after the value is removed. So when a user selects another furnace name(s) they get an SQL error because a null value is highlighted in the listbox. Clicking on the empty selection will not deselect it. I have to close and reopen the form for this to go away. I tried requery, recalc, and refreash.
The only fix I have right now is to do an isnull() check for each selected item. If the selected item is null then it’s not placed in my query string.
I made a conditional expression which checked for null selections. If true, I deselected all the values and requeryed the listbox to see if it would remove the empty selections...nope!
The problem is the row where the old furnace name existed is still highlighted, after the value is removed. So when a user selects another furnace name(s) they get an SQL error because a null value is highlighted in the listbox. Clicking on the empty selection will not deselect it. I have to close and reopen the form for this to go away. I tried requery, recalc, and refreash.
The only fix I have right now is to do an isnull() check for each selected item. If the selected item is null then it’s not placed in my query string.
I made a conditional expression which checked for null selections. If true, I deselected all the values and requeryed the listbox to see if it would remove the empty selections...nope!
Last edited: