Page 1 of 1

Setting a Checkbox value depending on database values

Posted: Thu Jun 29, 2017 1:45 pm
by Sanseviera
Hello,

I am trying to set a checkbox value depending on the value of a field returned from the database. I am using the following code in the
BeforePrint Event:

CheckBox5_8_Nein.Checked = IIF(LINK_Audit_umfasst_Prüfpunkt.Point_to_check.ja__nein_Frage != "yes",true,false);

but I am getting errors. I have tried other ways of doing it with STIExpression (as an object) and trying to convert that to boolean
but I am getting nowhere. There is only 1 forum entry for how to set a checkbox value in code but that actually doesn't provide a solution
either.

Can anyone please show me how to simply set the checkbox value above?

Re: Setting a Checkbox value depending on database values

Posted: Fri Jun 30, 2017 2:38 am
by Edward
Hi Sanseviera,

Please set the CheckedValue property instead.
CheckedValue.mrt
(5.77 KiB) Downloaded 410 times
CheckBox_CheckedValue.PNG
CheckBox_CheckedValue.PNG (57.17 KiB) Viewed 2524 times
Thank you,
Edward

Re: Setting a Checkbox value depending on database values

Posted: Fri Jun 30, 2017 1:22 pm
by Sanseviera
Thank you very much Edward, I will give this a try and let you know.

Re: Setting a Checkbox value depending on database values

Posted: Fri Jun 30, 2017 1:51 pm
by Alex K.
Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.