Link to home
Start Free TrialLog in
Avatar of Aiysha
AiyshaFlag for United States of America

asked on

Grayed check box

When the form loads, the checkbox color is gray, if clicked the check box has a check and the color turns to white. If I dont check it and add record, it gives -1 in the data field,does anyone know whats going on..I want the check box to look white when the form is loaded.

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of dmitryz6
dmitryz6

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thenelson
thenelson

The checkbox is what is known as a triple state checkbox.  Grey is null, checked is true, yes or -1 (actually anything other than zero is true) and unchecked is false, no or zero.  If the triple state is set to the default no setting, as soon as you click in the checkbox, it will alternate between true and false.  If the triple state property is set to yes, the checkbox will switch between null, true, false, null, etc.  By default, for new records, a tristate checkbox will be null or greyed out.  To make the default false, set the default value property to 0 as dmitryz6 stated.  To make the default true, put -1 in the default property.