Results 1 to 7 of 7
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919

    Conditionally toggle visibility of a check box

    On a continuous form, I want to toggle the visibility of a check box depending on a value in the current record. Since conditional formatting doesn't apply to check box controls, what might be a suggested method? Maybe a function reference via the conditional formatting of a companion text box? I tried using the On Paint event for the form but A2013 doesn't allow changing properties of controls, at least it didn't for a check box.

    Thanks

  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,824
    I am sure 2013 allows programmatically changing properties of controls. However, changing property of control will change it for all instances of the control - all records will reflect the same condition.
    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
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    suggest use a textbox instead - use one of the wingding fonts and use a character that is a cross or tick. then conditionally format the forecolor to match the backcolor. In the onclick event (which I presume you are using) have some code that checks the condition for the format and continue with the event or not as required.

  4. #4
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    changing property of control will change it for all instances of the contro
    Thanks June. I orgot all about that. I'll play with the idea Ajax submitted tomorrow afternoon.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,824
    I usually use a combobox for yes/no field. Might find this interesting http://allenbrowne.com/NoYesNo.html
    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.

  6. #6
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Odd that Access seems to be ignoring the Border Style and Border color properties of a check box control when set to something other than the defaults.

  7. #7
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Okay, here's the best I could come up with. Below is a screenshot showing a portion of 1 of 3 columns of names and associated check box options on a continuous form. The left column of check boxes applies to all records but the right column of check boxes ONLY apply where the check boxes are highlighted with a green boarder. Since check boxes DO NOT support any kind of conditional formatting, a text box is positioned behind the check boxes in the right column and their background colors are conditionally toggled white or green. With this approach, the user can easily see which check boxes are applicable and therefore save themselves the nuisance error message that they will get if they check a box where the option isn't applicable. Ideally, I would conditionally toggle visibility of the check box itself.

    Click image for larger version. 

Name:	000.jpg 
Views:	9 
Size:	107.0 KB 
ID:	31058

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

Similar Threads

  1. Label Visibility
    By joecamel9166 in forum Reports
    Replies: 3
    Last Post: 05-03-2016, 05:24 PM
  2. Replies: 3
    Last Post: 04-22-2013, 06:08 AM
  3. subform visibility
    By nichmeg in forum Forms
    Replies: 9
    Last Post: 11-04-2011, 12:22 PM
  4. Replies: 3
    Last Post: 01-13-2011, 03:53 AM
  5. Visibility of other controls
    By jlclark4 in forum Forms
    Replies: 7
    Last Post: 12-15-2010, 12:34 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