Changing the value of a check box

Avatar

30-01-2009

Hi there,



I am looking to change the value (on/off) for a checkbox. In my form, I would like a trigger mechanism such as the selection of a dropdown field that will automatically check one or many checkboxes using if-then-else statements but what is the script I use?

Replies

Avatar

Avatar

pguerett

Avatar

pguerett

pguerett

09-02-2009

If you open your form in Designer then highlight the checkbox and look at the Object Paletter, click on the binding tab and you will see what the checkbox will accept as ON/OFF values (this can be cvahnged if you wish). By default it is 1/0. So on th eexit event of your DD you could code something like this:



if (this.rawValue == "Test1"){

//turn checkbox on

CheckBox.rawValue = 1;

} else {

//turn checkbox off

CheckBox.rawValue = 0;

}