J
Jon A
I got this idea from the MSDN website, but can't get things working
quite right.
I have a listbox on one form. The listbox is populated by a query that
I put together in QBE. The query displays eight column, and gets four
of the values to use for searching from the form - there are four
dropdowns that are used to make selections and those selections will
limit the items displayed in the listbox.
Everything works OK as long as I have a selection in every one of the
four dropdowns. But sometimes that's not desirable - maybe a person
wants to list the items based on one or two selections. So if a combo
box is cleared, then nothing displays in the listbox at all.
I used the debugging window to make sure of the value of the combo box
when it is cleared. It has the value NULL.
Originally I set up my query with the following in the CRITERIA line
of QBE. Here is what it looked like for the [ItemType] control.
[Forms]![frm_SelectItem]![ItemType]
So I changed that to the following:
iif([Forms]![frm_SelectItem]![ItemType] Is Null, Like "*",
[Forms]![frm_SelectItem]![ItemType])
But that doesn't work. I still get no records returned when a combo
box is cleared but it works fine if there is a selection in every one.
Anyone can help please?
quite right.
I have a listbox on one form. The listbox is populated by a query that
I put together in QBE. The query displays eight column, and gets four
of the values to use for searching from the form - there are four
dropdowns that are used to make selections and those selections will
limit the items displayed in the listbox.
Everything works OK as long as I have a selection in every one of the
four dropdowns. But sometimes that's not desirable - maybe a person
wants to list the items based on one or two selections. So if a combo
box is cleared, then nothing displays in the listbox at all.
I used the debugging window to make sure of the value of the combo box
when it is cleared. It has the value NULL.
Originally I set up my query with the following in the CRITERIA line
of QBE. Here is what it looked like for the [ItemType] control.
[Forms]![frm_SelectItem]![ItemType]
So I changed that to the following:
iif([Forms]![frm_SelectItem]![ItemType] Is Null, Like "*",
[Forms]![frm_SelectItem]![ItemType])
But that doesn't work. I still get no records returned when a combo
box is cleared but it works fine if there is a selection in every one.
Anyone can help please?