Results 1 to 5 of 5
  1. #1
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365

    Setting check box


    I'm using a check box as a visual flag set by .visible property.
    In design mode I see the tick, but when the Form opens the tick changes to a wee black square.
    From Googling I'm told to set it's .Value property (NOT default value).
    But nowhere in Properties list can I find Value. What gives ?? Or am i just blind?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    If by Properties list you mean the Property Sheet, Value will not list there. You have ControlSource property to bind to field or an expression. Use code (macro or VBA) to set a control's Value.

    I am guessing this checkbox is not bound to yes/no field. If it were it would not show black square. Setting Value property of an unbound control will show the same value for all records.

    Visible property only determines if control shows or is hidden. Has nothing to do with data.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    If you go to a new record, box is always normally black. Once the record is saved it will be clear white if unchecked. At least that's how it works in tables. In forms I see a shaded box but it's more like a checkerboard shading.
    Not all properties are in the property sheet.
    https://learn.microsoft.com/en-us/of...checkbox.value
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Okay, correction, bound checkbox on NewRecord row is black/shaded when DefaultValue is not set. It will be clear and have value of False as soon as record entry is initiated.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    checkboxes have three possible values - true, false and null (the black square). Null can only exist for unbound checkboxes and new records where the bound field does not have a default value (of 0 or -1). A yes/no field can only store 0 or -1 so as soon as you start to complete a new record where the yes/no fields does not have a default value the null value will be updated to 0.

    checkbox controls (not fields) have a triple state property (normally set to no) which if set to yes enables a user to cycle through all three values - really only useful for unbound controls where perhaps a condition could have three values - for example a filter where you want to show all records where a condition is true or false - or use null to show both

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 04-05-2019, 11:24 AM
  2. Replies: 41
    Last Post: 12-06-2016, 08:40 AM
  3. Replies: 4
    Last Post: 11-08-2016, 07:49 PM
  4. Replies: 4
    Last Post: 02-03-2014, 12:16 PM
  5. Setting a Yes/No check box problems
    By newtoAccess in forum Queries
    Replies: 3
    Last Post: 04-13-2011, 04:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums