Results 1 to 6 of 6
  1. #1
    peterock is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    3

    Disabling the second combo, if a value selected from the first combo & vice versa.

    Hi,
    I am new to access & trying to learn access myself.
    I have designed a db & has 2 combos. Each combo represents a category. If something (a value) is selected from combo1, the other combo should be either disabled OR show an error. And vice versa.
    Basically user can select a value either from combo1 OR combo2.
    How would I accomplish this?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I'd be curious about the design, but you could adapt this:

    http://www.baldyweb.com/ConditionalVisibility.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    peterock is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    3

    user can select either ONE from the two combos.

    thanks pbaldy.That's not what I am looking for!
    I will elaborate my problem.
    I have to combo boxes - Chocolate & Icecream. Both the combos have drop down list.
    User can select either one variety from Chocolate OR one flavor from Icecream. Not from both.
    I have attached the sample db.Database2.accdb

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Not sure what you want then. That code could be used to disable the ice cream combo if a selection was made from the chocolate combo, or vice versa. I didn't say that was an out-of-the-box solution, I said you could adapt it. In your case, you'd test that something (anything) was chosen, rather than test for a specific selection.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    peterock is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    3
    ok, Thanks.
    instead of disabling (invisible), how can i grey out the box?

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The Enabled property will grey it out. The Visible property will make it invisible.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 22
    Last Post: 11-14-2011, 10:29 AM
  2. Replies: 1
    Last Post: 09-12-2011, 10:22 AM
  3. Combo box disabling other txtbox
    By GraemeG in forum Programming
    Replies: 2
    Last Post: 02-13-2011, 01:21 PM
  4. Enabling Disabling Combo Boxes from Values
    By vdanelia in forum Forms
    Replies: 3
    Last Post: 02-04-2011, 10:09 AM
  5. Replies: 6
    Last Post: 01-31-2011, 03:31 PM

Tags for this Thread

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