• Combo Box

    From Mike P@21:1/5 to All on Sat Feb 5 02:55:36 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Weiner@21:1/5 to All on Sat Feb 5 19:17:38 2022
    Mike P was thinking very hard :
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike P@21:1/5 to All on Sun Feb 6 03:26:40 2022
    OK. Thank you Ron.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)