Hello. I am learning LibreOffice Base version 7.5 (64k) on a Windows 10 desktop for a database that is HSQLDB embedded.
.
Although I understand how to do a simple list box on a form, I do NOT understand how to create a list box for a subform that is linked to a one-to-many table.
.
For example, here are my database table relationships:
- tblRecipes is behind the Main Form.
- tblIngredients is a catalog of all ingredients.
- tblRecipeIngredients is linked between the above two tables in one-to-many relationships, and contains a Primary Key that references the list of ingredients that is included in each recipe.
.
My form is designed with tblRecipes as the main form, and has a SUBform of its ingredients via tblRecipeIngredients.
.
As you can see below, the “Ingredients” field lists the NUMBER of the fldRecipeIngredients Primary Key (in tblRecipeIngredients)… but I need to see the NAME of the ingredient as defined in tblIngredients.
I am a Newbie, and have tried the following SQL Code, but it does NOT work. I also tried changing the “Bound” field to “0” to match the ID field to the Primary Key for the Data field," but that didn’t work either.
Does anyone know how to fix my SQL Code to display the NAME of the ingredient stored in tblIngredients, and referenced on the subform’s tblRecipeIngredients one-to-many table for each recipe?
.
I’d like to see the following that allows me to select the ingredient from a drop-down list:
Thanks!