Results 1 to 3 of 3
  1. #1
    khughes46 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Grapevine, TX
    Posts
    231

    How do I check a check box based on a field code?


    I have a report where I want to check one of three checkboxes based on a code in a field. For example if the code in the field is 0 I want to check, check box #1, if the code is a 1 I want to check, check box #2, if the code in the field is 2 I want to check, check box #3. I am using the check box in design view for the report and am assuming there must be some code in the control source. Can someone out there help me with this? Thanks.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Try:

    =[fieldname]=0

    =[fieldname]=1

    =[fieldname]=2

    Or do calcs in query then bind checkboxes to the constructed fields.
    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
    khughes46 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Grapevine, TX
    Posts
    231
    This worked very well, Thanks.

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

Similar Threads

  1. Check box based on values of other check boxes?
    By Michael.Reynolds1775 in forum Forms
    Replies: 3
    Last Post: 03-25-2015, 12:58 AM
  2. Replies: 5
    Last Post: 06-26-2014, 12:52 PM
  3. Replies: 4
    Last Post: 02-03-2014, 12:16 PM
  4. Check if record exists based off one field
    By cactuspete13 in forum Forms
    Replies: 3
    Last Post: 01-14-2013, 05:56 PM
  5. Code to check if field is empty
    By darekg11 in forum Forms
    Replies: 2
    Last Post: 09-18-2012, 03:15 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