Results 1 to 4 of 4
  1. #1
    rscott7706 is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2009
    Location
    Lakeside Ca
    Posts
    24

    Cool A Form field properties depend on Yes/No field entry

    I am building a table that includes "Yes/No" and "Amount" fields.



    So in my form design, I want two fields - "Yes/No", and "Amount" (initially deactivated).

    If "Yes" is selected, I want the "Amount" field to be activated.

    Now they can place the amount awarded in the "Amount" field.

    If they select "No" (default field), the "Amount" field remains deactivated.

    Is this possible?

    Thanks!
    Ron

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    if using a combo box to pick yes/no:

    Code:
    sub cboBox_afterupdate()
    txtAmt.enabled = lcase(cboBox) = "yes"
    end sub

  3. #3
    rscott7706 is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2009
    Location
    Lakeside Ca
    Posts
    24
    Thanks ranman256!!

  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,902
    Or use Conditional Formatting to set Enabled property of textbox or combobox.

    Is the form in continuous or datasheet view? Can record be saved with the Y/N field as No? User could return to the record and edit?
    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. Replies: 7
    Last Post: 07-01-2017, 01:07 AM
  2. Replies: 1
    Last Post: 12-28-2016, 11:39 AM
  3. Replies: 1
    Last Post: 02-16-2013, 09:05 AM
  4. Replies: 5
    Last Post: 09-21-2012, 11:23 AM
  5. Set textbox field to depend on current date
    By lilanngel in forum Queries
    Replies: 6
    Last Post: 03-10-2011, 08:16 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