Check Box seems to have 3 states as default

5 replies [Last post]
dtison
Offline
Last seen: 25 weeks 5 days ago
Title:
Joined: 20 Jun 2013
Posts: 8
Hello All… When I put a check box in Base bound to a Boolean field it seems to have 3 states not 2 as a default. I know there is a tri-state option. Any one else run into this? Any Help would be appreciated.

Thx Dave

frofa
frofa's picture
Offline
Last seen: 13 hours 24 min ago
Title: ★★★★★
Joined: 24 Feb 2012
Posts: 804
Check Box seems to have 3 states
Would they be NULL, 0, 1?
dtison
Offline
Last seen: 25 weeks 5 days ago
Title:
Joined: 20 Jun 2013
Posts: 8
Thx for reply
Hey THX for the reply! I didn’t assign any thing to the reference state on the data tab, but my understanding is should be true or false if you fill that out, that didn’t work either. The check box works fine, when you place a check in it, I can qualify search’s using, “is not empty”. But if you remove it, the check, it still thinks the check is there. So the effective result is once you check the box, it will stay checked on a form even if not checked. If you view it in the underlying table, query or table view, it has three visible states, checked, filled (a black square) and empty or blank. From here you can “UN-Check” (which is the square filled state) the check box but not from the form.

I am using LO 4.204 and HSQLDB 2.3 in a multi user state, if that makes any difference

Again I appreciate any thoughts or help here!

frofa
frofa's picture
Offline
Last seen: 13 hours 24 min ago
Title: ★★★★★
Joined: 24 Feb 2012
Posts: 804
Check Box control on form - please check
Hi Dave:

Is the text-box (or column) in your form a check-box type? There should also be a ‘tri-state’ property visible which can be set to ‘no’. See attached screenshot.

AttachmentSize
Base_form_checkbox_properties.png 53.94 KB
dtison
Offline
Last seen: 25 weeks 5 days ago
Title:
Joined: 20 Jun 2013
Posts: 8
Thx Again
Thx Frofa

I chose the Booleen or Yes/No Field as the bound field type, which is what I have read
is correct. It seems to have three options itself however.

The only way it seems to work properly is to select the tristate mode on the form,from the tab on it’s control as you have displayed. That allows you to step through all three states from the form without going to the underling table.

Answering No or leaving it in it default state (Non Tristate) seems to allow you to use it only once from a form.

It works, just a little weird having three answers in a field what should have only two.

dtison
Offline
Last seen: 25 weeks 5 days ago
Title:
Joined: 20 Jun 2013
Posts: 8
Solved
Figured it out It is a tough one, at least for something that should be simple. You have to create a Boolean field with only 2 States. Which are true and false The GUI didn’t seem to allow this so you have to input SQL directly under the tools Menu the following ALTER TABLE “Table_Name” ADD “Column_Name” BOOLEAN DEFAULT FALSE NOT NULL;

Then create the check box.

Thx all

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.