• Combo Box

    From Mike P@mikewpayne@tiscali.co.uk to comp.databases.ms-access on Sat Feb 5 02:55:36 2022
    From Newsgroup: comp.databases.ms-sqlserv

    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
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Ron Weiner@rw@domain.com to comp.databases.ms-access on Sat Feb 5 19:17:38 2022
    From Newsgroup: comp.databases.ms-sqlserv

    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
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Mike P@mikewpayne@tiscali.co.uk to comp.databases.ms-access on Sun Feb 6 03:26:40 2022
    From Newsgroup: comp.databases.ms-sqlserv

    OK. Thank you Ron.
    --- Synchronet 3.21d-Linux NewsLink 1.2