Multiselection not working for listbox

Discuss the database features
Post Reply
doranhenrie
Posts: 4
Joined: Fri Jul 22, 2022 2:54 am

Multiselection not working for listbox

Post by doranhenrie »

When I click on Yes for multiselection and save it it goes back to No. What do I need to do to be able to get multiselection to work. Do i use the ctl key to select multiple items once I get it working.
OpenOffice 4.1.12 on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Multiselection not working for listbox

Post by Villeroy »

Multi_Select_Listbox.ods
(15.89 KiB) Downloaded 74 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
doranhenrie
Posts: 4
Joined: Fri Jul 22, 2022 2:54 am

Re: Multiselection not working for listbox

Post by doranhenrie »

Sorry, I'm using Base not Calc.
OpenOffice 4.1.12 on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Multiselection not working for listbox

Post by Villeroy »

What do you expect to be written into the linked field of the current record when you select multiple values?
A multiselection listbox does not work with the regular database binding nor does it work with a spreadsheet (as demonstrated in my sample sheet).

A many-to-many relation works like this: [Example] Relations reflected by list boxes in forms (relation between persons and things)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
UnklDonald418
Volunteer
Posts: 1549
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Multiselection not working for listbox

Post by UnklDonald418 »

A ListBox query has a display field, usually a string of text that makes sense to the user and a boundfield usually an integer that uniquely identifies the display field in the table being queried.
When the user selects a text string from the ListBox control it stores the boundfield value in the table field that the ListBox control references on a Base form.
Since that table field in a normalized database can contain a single value, multiselection makes no sense.
You may have a defective (not normalized) database design or need something other than a ListBox.
With a more detailed explanation of what you are trying to accomplish, or better yet an example database, we might be able to offer suggestions.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Post Reply