Results 1 to 2 of 2
  1. #1
    wtucker is offline Advanced Beginner
    Windows 8 Access 2016
    Join Date
    Jun 2017
    Posts
    50

    Question Populating a checkbox based on a field value

    Hello everyone,

    I've got a quick question. I've got two check boxes on a form. Each one has a long label. Depending on the value of a field in my table, I want one of them to show as checked. The field is a short text field. I've tried some logic like this:
    Code:
    =iif([TableA]![fieldA]="In",TRUE,FALSE)

    So if fieldA="In", I want the first checkbox to show as checked. if fieldA="Out", I want the second checkbox to show as checked.

    Any suggestions?


  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Cannot make a call to the table with that expression. The field must be in the form's RecordSource.

    For the first checkbox:
    =[fieldA] = "In"

    For the second checkbox:
    = [fieldA] = "Out"
    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.

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

Similar Threads

  1. Populating a field based on 2 other fields
    By BEI77 in forum Sample Databases
    Replies: 12
    Last Post: 12-30-2016, 08:36 AM
  2. populating field in form based on input field
    By BrandonFinn in forum Forms
    Replies: 7
    Last Post: 10-30-2014, 10:45 AM
  3. Populating one field based on another
    By thedanch in forum Access
    Replies: 1
    Last Post: 06-11-2012, 11:13 AM
  4. Replies: 7
    Last Post: 11-26-2010, 07:54 PM
  5. Populating attachment field based on text box
    By justinwright in forum Forms
    Replies: 16
    Last Post: 09-22-2010, 08:38 AM

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