Main and Sub-Form linking

Hi.
Elaborating on top of

Frustrated with “advanced” database Forms

I was able to make

  • a Main Form: Combo Box source = SELECT DISTINCT “code” FROM “Persons” for operator’s pick-up of client’s code (pk)

and also inserted

  • a sub-form: Table – data source = table (client’s) Activities

But wasn’t able to link selected “code” on Combo Box to Activities form on sub.
REM: on a Table – Table setup I’ve made it. But based on parametrized query via the pop-up (InputBox)
Parameter Input
Parameters

How can one do this via Combo Box and the Table on Sub?
Thanks in avance!



A combo box is a text box with auto-complete. It writes the entered text into a text column, no matter if it is a text from the list or not.
A typical list box shows a string while writing the string’s corresponding primary key into a foreign key.
Both form controls write one value into one field of the current record. And this is what you are doing in your screenshot. They have nothing to do with filtering, unless you turn on form filter mode (one of the filter buttons on the form navigator).
In form filter mode, you enter a list- or combo box value as a filter criterion. Then you turn off the form filter mode and get the filtered result set.

Subforms are filtered by the related fields of the parent form’s current record. You select a record in the parent form and this record will filter the subform and pass over default values for new subform records.
The form/subform mechanics can be utilized for filtering, if you store form control criteria (list box or whatever) into a separate table.
https://ask.libreoffice.org/uploads/short-url/i12usZeALIOOQuEeW0YnlBsEwry.odb

No; note that Combo Box is not. On CB is selected code 4784 but on Transactions Table it is 8317.
This is what I would like to accomplish if possible.
That’s to say: replace the Table (that works!) of Form Transactions Main by just a Combo Box.
I tried the Refresh control but it did not also.