Include the value of a form control in a listbox SQL
Include the value of a form control in a listbox SQL
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.
Last edited by MrProgrammer on Sun Mar 27, 2022 4:36 pm, edited 1 time in total.
Reason: Moved topic from Beginners forum to Base → Forms
Reason: Moved topic from Beginners forum to Base → Forms
Allen Wegele OpenOffice ver4.1.11 macOS 11.6.4 Big Sur
Re: Include the value of a form control in a listbox sql
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.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice