December 4th, 2012, 01:26 PM
I want Null checkboxes.
I have a subform in datasheet view. There are two checkboxes on the form. I have the triple state property of the checkboxes set to yes. The checkboxes are bound to a field in the table. I want them to display as null if they are null. (Grayed out, or blued out in my case.) The reasoning is that I want to know if the user did not enter the information or if the boxes are checked false. It also servers a visual reminder to the user that they have not yet made the selection. I've set the default value of the checkboxes to null in the main table properties, as well as the control properties on the subform. Currently they are always showing up as false unless changed to true, but I cannot get them to display as null. The only Null checkboxes i see are in the new record of the datasheet view.
December 4th, 2012, 04:46 PM
This is one reason I avoid checkboxes and triple-state. Don't understand it. Doesn't seem to work the way it should, at least not the way I would expect. I have tried to do what you are looking for and gave up. I doubt you will have better luck.
Last edited by June7; December 4th, 2012 at 04:49 PM.
December 5th, 2012, 07:32 AM
well.... that sounds like a challenge... now I have to do it...
December 5th, 2012, 08:17 AM
After some research I've found it is possible. The problem lies in the datatype of the checkbox. The triplestate property is somewhat misleading. It will not work on Yes/No datatypes. The Yes/No datatype cannot have a null value, it always defaults to no. (unless otherwise specified by the user) The datatype of the field must be either text or number. I changed my bound field to number datatype. It required that I update all of my new number fields to null. (Conversion from Yes/No to number put a zero in all of the number fields.) The triple state property now works correctly on the datasheet subform.
Here is the link were I found the necessary Info: Microsoft Access tips: Code accompanying article - Has the record been printed?
December 5th, 2012, 03:48 PM
Ahhh! So it is a text or number field bound to a checkbox control! Finally understand. Glad you disproved my doubt.
December 5th, 2012, 04:40 PM
And I am glad to have learned something new also. Thanks.
Office 2010, 2007, 2002
If I helped you, then click "give rep" button in the lower left corner.