I am fairly new to InfoPath and was given the task of designing a form. In
creating this form, I have come to a point where I want to be able to
change a user's access to certain areas, but I have to read in the values
from the database. I set up the text fields to query the database using a
connection, but I do not see this functionality within the checkbox items.
I tried to write my own function, and it reads the values from the database
but will not check the checkbox. I have a routine called SetFormValue, but
it will not check the checkboxes. I have used CInt, CBool, CString, and
even If statements to try to get the values to show up correctly. If I do
something like strValue = rsData("CheckBoxValue") and do a MsgBox strValue,
it will show the True or False value. Any ideas? Thank you in advance!
-Dallas
Greg Collins [InfoPath MVP] - 14 Apr 2005 23:53 GMT
Double-click the check box control and see what it's On Value and Off Value is. You must match those values exactly for the check box to function properly.

Signature
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com
I am fairly new to InfoPath and was given the task of designing a form. In
creating this form, I have come to a point where I want to be able to
change a user's access to certain areas, but I have to read in the values
from the database. I set up the text fields to query the database using a
connection, but I do not see this functionality within the checkbox items.
I tried to write my own function, and it reads the values from the database
but will not check the checkbox. I have a routine called SetFormValue, but
it will not check the checkboxes. I have used CInt, CBool, CString, and
even If statements to try to get the values to show up correctly. If I do
something like strValue = rsData("CheckBoxValue") and do a MsgBox strValue,
it will show the True or False value. Any ideas? Thank you in advance!
-Dallas
Dallas Tester - 18 Apr 2005 19:20 GMT
It says that the values are "True/False (boolean)." I have set it to those
values and casted the return values to booleans. One thing that I did
notice was that whenever I set the value to true or false, you cannot click
it or change it. It is like it has the value, but it does not display the
check. Any ideas?
-Dallas
Greg Collins [InfoPath MVP] - 06 May 2005 18:19 GMT
"True/False (boolean)" is the data type, not the values. If you look in the properties dialog box for the check box you will see two separate fields, one for the on value and one for the off value. Those are what you need to use. Under certain conditions you can change those values, and others (like working with a database) you cannot.

Signature
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com
It says that the values are "True/False (boolean)." I have set it to those
values and casted the return values to booleans. One thing that I did
notice was that whenever I set the value to true or false, you cannot click
it or change it. It is like it has the value, but it does not display the
check. Any ideas?
-Dallas