Discussion:
Combo Box
(too old to reply)
Mike P
2022-02-05 10:55:36 UTC
Permalink
ComboBox Row Source
I have a combo box with a row source based on a query that has a WHERE clause, "WHERE ACTIVE = True". The bound column is the ID field for the underlying table and is not visible in the drop down list for the combo box.
This works except that, over time, some records are no longer in the combo box row source because the ACTIVE field has been set to False and the combo box is blank.
How can I make the combo box work for records that have ACTIVE = False without taking out the WHERE clause from the row source query?

Mike P.
5/2/22
Ron Weiner
2022-02-06 00:17:38 UTC
Permalink
Post by Mike P
ComboBox Row Source
I have a combo box with a row source based on a query that has a WHERE
clause, "WHERE ACTIVE = True". The bound column is the ID field for the
underlying table and is not visible in the drop down list for the combo box.
This works except that, over time, some records are no longer in the combo
box row source because the ACTIVE field has been set to False and the combo
box is blank. How can I make the combo box work for records that have ACTIVE
= False without taking out the WHERE clause from the row source query?
Mike P.
5/2/22
If you want to allow the user to decide which subset of records (Active
or Inactive) to display, add a CheckBox to the form. Then in the Click
event of the CheckBox Update the sql in the Combo's Row Source to
appropriate sql based on if the checkBox was checked or not.

Rdub
Mike P
2022-02-06 11:26:40 UTC
Permalink
OK. Thank you Ron.

Loading...