LO Calc linked to MySQL via Base: how to fill dropdown list with DB data?

I have a MySQL DB linked to Calc via Base. I can access DB records from Calc. In this DB I have a table named accounts which holds the following data: cash, bank, virtual so I can select where the money goes to or comes from. I can’t figure out how to fill this dropdown with accounts table records to select one opton.

Thanks in advance!

Don’t know what you want to do with Calc here, but a listbox in a form will be filled by SQL.

Table name is “accounts”, primary key might be “ID” and the field might be “cash”. So, together with MySQL/MariaDB this might be the SQL-code:

SELECT `cash`, `ID` FROM `accounts`
1 Like

I know how to build queries and get/set the info I need. I just don’t know how to link the SQL resultset to a form control… Even worst when I have dependant dropdowns

Might be documentation helps: Form control list box, see “Data Tab”.

Do you create the form in Base or do you create it in Calc?

I’ve created the form in Calc. However, I think it would be better to use Base

It’s the same process and the same result. Embedded forms are Writer documents in web view. The document is just a canvas for the form.

Demo about interconnections between Calc and Base: Apache OpenOffice Community Forum - [Solved] Using Filter in Calc V3.1 with dates - (View topic)