Page 1 of 1

Include the value of a form control in a listbox SQL

Posted: Sat Mar 26, 2022 6:15 am
by allen1147
I want to refer to the value of a combobox on a form in Base in the where clause of the sql that populates a listbox on the form. Ideally the listbox sql should execute any time the value of the combobox is changed by the user. If that is possible, I would prefer to use the value of multiple comboboxes (at least two) in creating the where clause in the sql for the listbox whenever the value of either of the two comboboxes is changed by the user. I know how to write sql but don't know how to modify the where clause to refer to a control on the form and its value and how to initiate a refresh of the contents of the listbox.

Re: Include the value of a form control in a listbox sql

Posted: Sat Mar 26, 2022 2:29 pm
by Villeroy
It is a major shortcoming that we can't have parameters in listboxes as we have in subforms. If your combobox text is stored in some table, [Base, Python] Tiny Macro Refreshing Forms, List/Combo Boxes can refresh forms and refreshable form controls once a record has been saved or deleted.