[Base] Populate fields in a table using lists of two other tables

Hello All,

I’d like to know if Base/Forms is able to do the following.

I have three tables.

table_worker with one field called worker_name and a bunch of names,

table_shift_time with one field called shift, and data (day, swing, graveyard),

table_schedule with two fields (worker, shift)

Can I use a form to display the data in table_worker table and table_shift_time as drop-down lists, then have a user pick/highlight the worker and shift and have the choices populate table_schedule?

If so, can you point me to the documentation area, video tutorial, or example(s) that I can learn how to do this from?

Thank you.

Hello,

What you need is simple list boxes based upon table data. First, in case you don’t have this, here is the page for Base documentation → LibreOffice Base Handbook.

Chapter 4 - Forms describes the list box and use. The combo box is similar but allows entries not in the table. Nor can it substitute values saved. List box is usually preferred for what you want.

Each of your tables should have a primary key of type Integer - usually auto increment.

So your resulting form is simple. Attached is a quick sample with your requirements:

Sample ------ListBox.odb

Thank you. This is what I wanted.

@fbaldeva

As you have been helped, please help others to know the question has been answered by clicking on the :heavy_check_mark: in upper left area of answer which satisfied the question.