#1
  1. Contributing User
    ASP Adventurer (500 - 999 posts)

    Join Date
    Jun 2011
    Location
    South Jersey
    Posts
    544
    Rep Power
    59

    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.
  2. #2
  3. Moderator
    ASP Super Genius (4500 - 4999 posts)

    Join Date
    Apr 2009
    Location
    The Great Land
    Posts
    4,620
    Rep Power
    650
    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 03:49 PM.
    I like to know if my suggestion helped you. One way to let me know is by clicking star at bottom left corner of post.
    Debug!Debug!Debug!http://www.cpearson.com/excel/debug.htm
  4. #3
  5. Contributing User
    ASP Adventurer (500 - 999 posts)

    Join Date
    Jun 2011
    Location
    South Jersey
    Posts
    544
    Rep Power
    59
    well.... that sounds like a challenge... now I have to do it...
  6. #4
  7. Contributing User
    ASP Adventurer (500 - 999 posts)

    Join Date
    Jun 2011
    Location
    South Jersey
    Posts
    544
    Rep Power
    59
    Solution:
    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?
  8. #5
  9. Moderator
    ASP Super Genius (4500 - 4999 posts)

    Join Date
    Apr 2009
    Location
    The Great Land
    Posts
    4,620
    Rep Power
    650
    Ahhh! So it is a text or number field bound to a checkbox control! Finally understand. Glad you disproved my doubt.
  10. #6
  11. Contributing User
    ASP Adventurer (500 - 999 posts)

    Join Date
    Feb 2008
    Location
    Lake County, IL
    Posts
    865
    Rep Power
    152
    And I am glad to have learned something new also. Thanks.
    Alan Sidman
    Office 2010, 2007, 2002

    If I helped you, then click "give rep" button in the lower left corner.

Similar Threads

  1. Showing Values that don't Equal field or Null as a Null
    By ipicus in forum ASP Development
    Replies: 1
    Last Post: November 19th, 2010, 12:26 AM
  2. Checkboxes
    By ldoodle in forum ASP Development
    Replies: 3
    Last Post: September 15th, 2009, 11:55 PM
  3. Invalid use of null ? how to assign Null
    By faqirullah in forum Microsoft Access Help
    Replies: 4
    Last Post: November 21st, 2006, 06:40 AM
  4. checkboxes
    By ScottishTerrier in forum Microsoft Access Help
    Replies: 2
    Last Post: January 10th, 2005, 03:14 AM
  5. Replies: 6
    Last Post: September 23rd, 2004, 01:49 AM

IMN logo majestic logo threadwatch logo seochat tools logo