Hi. I’m new to LibreOffice Base. I started a project where I have articles and authors in a database. I created a form to insert them. Both have a separate table. In the form for new articles I have a combo box which lists the authors. It works with the first SQL-statement, but not with the second or third:
SELECT DISTINCT "AuthorID" FROM "T_Authors"
SELECT DISTINCT "lastname", "AuthorID" FROM "T_Authors"
SELECT DISTINCT "lastname" || ', ' || "firstname" AS "Name", "AuthorID" FROM "T_Authors"
SELECT DISTINCT "lastname" || ', ' || "firstname" AS "Name", "AuthorID" AS "F_AuthorID" FROM "T_Authors"
Of courye I want the box to list the author by name, not by value. But as soon as I add a value other than the author id it fails. In that case the combo box mostly jumps back to “0” and alway writes the value 0. How to tell it whick is the value to display in the combo box and which is the one to store?