[Solved] 1st Item of a ListBox is empty

Creating and using forms
Post Reply
jlmarsu
Posts: 8
Joined: Tue Apr 05, 2016 9:36 am

[Solved] 1st Item of a ListBox is empty

Post by jlmarsu »

Hi,

I am new on the forum, so please forgive my eventual mistakes ..

I am developping a openoffice base project.
I am using forms and in some of them using Listboxes, which ItemList source is an SQL query resultset

The Listbox item list always begins by an empty value, (item(0)) followe by the items resulting of the query output.

I am wondering how to avoid this empty item.

I have used basic to try to remove the first item (using RemoveItem), but this is quite tricky as everytime the form is updating, the query executes and the itemlist gets updated with ... the empty entry.

Any idea how I oculd solve that ?

My project is connected to a mySQL DB tables

Using Opneoffice base 4.1.3
Using MySQL 5.1.7


Thanks!

JL
Last edited by jlmarsu on Fri Dec 01, 2017 4:36 pm, edited 1 time in total.
Apache Open Office 4.1.2
Windows 7 64bits
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: 1st Item of a ListBox is empty

Post by UnklDonald418 »

If the table column has a Not Null constraint the Listbox shouldn't display that option.
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
jlmarsu
Posts: 8
Joined: Tue Apr 05, 2016 9:36 am

Re: 1st Item of a ListBox is empty

Post by jlmarsu »

Thanks, will modify the constraint setup and hopefully get the expected behavior |

Thanks again.

JL
Apache Open Office 4.1.2
Windows 7 64bits
jlmarsu
Posts: 8
Joined: Tue Apr 05, 2016 9:36 am

Re: 1st Item of a ListBox is empty

Post by jlmarsu »

Hi

This worked out for 2 out of 3 table entries, despite they all have same setup.
Will investigate further, but the solution is in this area.
Thanks for the help

JL
Apache Open Office 4.1.2
Windows 7 64bits
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: 1st Item of a ListBox is empty

Post by UnklDonald418 »

For the one that didn't work check whatever you are using to generate the List Content, it is might be returning a blank row.
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