List Box - List entries not syncing with List content

I have several List Boxes where I have a Value List of numbers in List content under the Data tab, and then corresponding text in the List entries field under the General tab. e.g. 0 = “Open”, 1 = “Closed” etc.

(I’m using the numbers in the fields because they are accessed by several queries which only seem to work with numbered fields.)

When I first set them up, they seem to work fine showing the text in the listbox on the form and entering the corresponding number into the table field. However when I click back into design mode or close the form and then reopen it, they quit working. The only number they’ll enter into the table field is 0 no matter what is selected in the list box.

I wonder if anyone has any insight into why this might be happening?

Many thanks in advance for any ideas or assistance.

DM

Here are some ideas to possibly help you figure this out: Can other fields enter data into this same table properly at that point? And what is the type of field you’re entering this into, e.g. integer, … ?
What if you change that field type to variant (or repoint the listbox to a variant field to test it with). And if you also create a non-list box for this same field, can you then enter a value into it directly? Does that work?

Thanks for the suggestions. I change the field type from integer to Text var, and it seemed to be working. But after working with it for a while, it snapped back on it’s own to just entering zero into the table filed whatever was entered in the list box field.

I checked out the link provided by Ratslinger below, but it seems like @PYS is having the same problem with no better results.

@DougKMiles - Just saw this comment today as messaging in this forum is a bit screwed up! I downloaded the sample in the mentioned post and it works perfectly for me. I even changed the letters to numbers and again no problems whatever I try. You have never mentioned your OS or LO version and also if Linux is this a distro version of LO?

Don’t understand what you problem is with the query - maybe something in your statement.

Here is how the listbox should be set (this example used letters vs numbers):

image description

image description

For a working sample of this click here and select the sample in the answer provided by @PYS.

Thank you Mr. R!
Yes, that’s pretty much exactly what I have except using numbers. Weird. I’ll check out the pierre-aves samyn sample.

Don’t understand what you problem is with the query - maybe something in your statement.

Here is how the listbox should be set (this example used letters vs numbers):

image description

image description

For a working sample of this click here and select the sample in the answer provided by @PYS.