Trying to create a list box in Writer and pull data from Base table. Can not find any documentation on how to do it
If you can’t see toolbars Form Controls
and Form Design
choose View
→ Toolbars
→ Form controls
and View
→ Toolbars
→ Form design
, so that you will have the right toolbars, for what you want to do.
- In the
Form design toolbar
chooseToggle design view
icon. - From the
Form design toolbar
chooseForm navigator
icon and right click in word “Forms”. - Choose
New
→Form
. - Right click on the new form you inserted in the previous step, choose
properties
and select yourData source
. - From toolbar
Form controls
insert the object you like (list box). - Again in Form Navigator, below the new form you inserted, you can see the object list box, right click on it and insert the properties you want.
First make sure you database is registered. You cannot access databases that are not registered. This list is from menu Tools->Options->LibreOffice Base->Databases
. If not listed, you can add it using New
and point to the .odb location.
If not on already, turn on the Form Design
toolbar (menu View->Toolbars
) and then turn on Form Controls
toolbar (floating toolbar). Select the List Box
tool from the Form Control
toolbar and on the document hold down left mouse button and drag to size the object.
If Wizards are ON you can follow that or do it yourself as follows.
Now you need to add information to the object. From the Form Design
toolbar, click on the Form Navigator
icon. You should now see this:
Right click on Form
and select Properties
.
In the Data
tab, Data Source
select the database where the table is located. Content Type
should be Table
and in Content
select the table which contains the data for your list. The form is now set so close properties.
From the Form Navigator
right click on the List Box 1
(unless you renamed it) and select Properties
.
Again from the Data
tab, set Data Field
to the column where you values are, Type of list contents
to Sql
, use the ellipsis to the right of List content
to set the column for the data list, and finally set Bound field
to 0
(signifying the first field).
If all went right, click on Toggle Design Mode
on the Form Design
toolbar and your list box should be filled.