View Full Version : Checkboxes


Little_Man22
08-05-2001, 04:53 PM
2 Questions:

1. How do you get the checkboxes on a form to not have a greyish/black background. As soon as you 'check' and then 'uncheck' them they develop a white background...is it possible to have a white background from the beginning?

2. How do you get a checkbox to, as a default, be checked. I tried setting the default value to 'yes' but this does not result in the checkbox being 'checked' when you first open a form.

Thanks.

pcs
08-05-2001, 05:06 PM
1. the 'greyish/black' background is because the checkbox has no value (ie.Is Null).

2.if your checkbox is Unbound setting the default to Yes should work. but, if it is bound to a table/query it will display the the value in the table (Null?). set the default value for the checkbox in the table to Yes and that should fix the problem.

hth,
al

R. Hicks
08-05-2001, 05:13 PM
What you use can depend on the datatype you are using as the bound field.

Yes/No ....... Yes = Checked ... No = Unchecked
True/False ... True = Checked ... False = Unchecked
0/Anything other than 0 ... 0 = unchecked anything else = checked

All of the above is assuming that you are using a checkbox that not within an Option Group frame. If it is within an Option Group, the frame controls the state of the checkboxes within it. In this case a 0 (zero) assigned to the frame will cause all checkboxes within the frame to be unchecked.

HTH
RDH

[This message has been edited by R. Hicks (edited 08-05-2001).]

pcs
08-05-2001, 05:33 PM
R. Hicks is correct if it is a bound field. i was trying to point out that there are 3 possibilities for a boolean field True/False/Null.

create a form and put an unbound checkbox on it...set the properties to Triple State: Yes. then click the check box, think that will show you what we are saying...

al