Populate a database using table relationships

I’m making my first database in Base and I have a little problem.

Imagine this database:

Table: Employee

ID:1
Name:John
OccupationID:1

ID:2
Name:Clara
OccupationID:2

ID:3
Name:Simon
OccupationID:3


Table: Occupation

ID: 1
Name: TroubleMaker
Salay: 500k

ID: 2
Name: ProblemSolver
Salary: 1200k

ID: 3
Name: TimeWaster
Salary: 3600k

I’d like to be able to add new Employees to the database, but instead of typing manually OccupationID numbers into the fields, I’d want to have a drop down menu where I can select “Trouble maker”, “Problem solver” or “Time waster”.
Otherwise putting the data into the Employee table will require me to constantly look up other tables, and it’s really not practical.

I’m sure there’s a way to solve this problem, but I’m fairly new to this software.

Hello,

This is relatively easy by using a List box. As there are many options to using this, it is best if you review the LO documentation. Please look on this page → LibreOffice Base Handbook. Please look at Chapter 4 - Forms. There is a section on controls, their properties and functions. You will on that page samples databases which will should help.

You will also find working samples in this forum by using the search box and looking for ‘List Box’.

Thanks! Can I also use a Combo Box instead? I tried it, but it doesn’t seem to work. The List Box is working though!

There are differences between the two. The combo box cannot substitute values. With the combo box you can enter values other than what is listed. They each have their advantages and you need to use accordingly.

Thank you!
I figured that what I needed was a list box with a drop-down property enabled.