I'd like to populate a foreign key field in one table using a combobox/dropdown where the values the user sees are not the IDs but a description field from the foreign table.
Consider the following setup:
create table people (
id int identity primary key,
name varchar(250),
job_id int
);
create table jobs (
id int identity primary key,
description varchar(250)
);
insert into jobs(description) values 'foo';
insert into jobs(description) values 'bar';
I have specified the foreign key relationship in the relationships window:
And I'd like the user to see jobs.description
when creating a new person
via a form.
But I can't see how to do this. If I create a form based on a query which joins the two tables, then I can't create new data, and if I create a form based of people
, the Subform based on existing relation
option is greyed out:
In Access this is easy to achieve with the Form wizard:
How can I achieve this in LibreOffice/OOo Base?