[Solved] 1st Item of a ListBox is empty

Creating and using forms

[Solved] 1st Item of a ListBox is empty

Postby jlmarsu » Thu Nov 30, 2017 7:29 pm

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
jlmarsu
 
Posts: 8
Joined: Tue Apr 05, 2016 9:36 am

Re: 1st Item of a ListBox is empty

Postby UnklDonald418 » Thu Nov 30, 2017 10:12 pm

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.6 & LibreOffice 6.1.1.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1060
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: 1st Item of a ListBox is empty

Postby jlmarsu » Thu Nov 30, 2017 11:00 pm

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

Postby jlmarsu » Fri Dec 01, 2017 4:36 pm

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
jlmarsu
 
Posts: 8
Joined: Tue Apr 05, 2016 9:36 am

Re: 1st Item of a ListBox is empty

Postby UnklDonald418 » Fri Dec 01, 2017 8:28 pm

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.6 & LibreOffice 6.1.1.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1060
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA


Return to Forms

Who is online

Users browsing this forum: No registered users and 4 guests