Spreadsheet (Grid) sub form with drop down list

I have three tables in a Libreoffice Base database

Table 1: fishing_trip
id_trip [auto-valued primary key]
date [date]
vessel_name [text]

Table 2: species
id_species [auto-valued primary key]
scientific_name [text]
common_name [text]

Table 3: catch (i.e. species in the trip)
id_catch [auto-valued primary key]
id_trip [foreign key from fishing_trip]
id_species [foreign key from species]

On one trip many species can be caught, hopefully.

So I’m trying to build a form to enter fishing trip information (date and vessel name) with a spreadsheet (grid) sub form to enter data in table 3 (catch). The field id_trip is the link between tables 1 (trips) and 3 (catch) and I have only the field id_species visible on the spreadsheet.

The grid subform seemed to be the only one where I can see on one screen all the species taken on the trip, together with the trip’s information .

Nevertheless, doing this I have to type the id_species number into each cell of the spreadsheet, what is terrible. Is it possible to have something like a drop-down list with species names in the cell? In the sub form I would like to see species names, not id_species number.

Is there any other way I can get around this problem?

Thanks for any help.

No problem to set a cell to a list box. While editing the form: Set the mouse on the header of the table control. Right mouse click on the header will show you the possibility to change the type of the field to list box.

See first chapter of Base Guide (page 24ff). There is an example with such a list box in a table control. 3 tables as you have created also.

1 Like

Thanks RobertG, I really appreciate your attention and help. I have already downloaded the Guide. All the best.