Results 1 to 7 of 7
  1. #1
    HansBades is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Dec 2021
    Posts
    85

    One field value in a form condition upon another-

    How can I get one field in a form to be visible and available for entry only when another field (which is also from another table) has been chosen with a certain value? Thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,913
    Should not be doing data entry to fields of multiple tables in one form, at least that would be unusual situation.

    However, use control AfterUpdate event to set other control enabled/disabled.

    Me.control2.Enabled = Me.control1 = "this specific value"
    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
    HansBades is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Dec 2021
    Posts
    85
    Thanks. How would I get one field value to trigger the automatic selection of another field in the same form? Thanks again.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,798
    If Me.someField = someValue Then Me.OtherControl.SetFocus

    unless by selection you mean something else.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    HansBades is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Dec 2021
    Posts
    85
    I wasn't clear with my question. Each field is a combobox on my form. Where one value is chosen in one combobox, I would like it to automatically choose a value in another combobox on the same record.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,913
    Well, that's not what you said in OP.

    Why? What value do you want to set in combobox?
    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.

  7. #7
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,798
    If Me.someField = someValue Then Me.OtherControl = anotherValue
    Not sure I see the sense in populating combos this way - they might as well be textboxes?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 2
    Last Post: 10-20-2016, 02:33 PM
  2. Replies: 1
    Last Post: 05-31-2016, 07:29 AM
  3. Adding Value to a field when condition is met
    By Gabynex9 in forum Access
    Replies: 14
    Last Post: 05-21-2015, 08:21 PM
  4. Replies: 8
    Last Post: 10-24-2012, 12:47 PM
  5. Replies: 6
    Last Post: 12-01-2010, 06:52 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