Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    509

    combobox + conditional format

    is it possible to add conditional formatting to the records of a combo box (so those records that meet a specific condition are displayed differently)?

    many thanks in advance,
    Mark

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Not sure exactly what you mean! If one of your selections for the combobox is meat, how would you like it displayed and where? I'm assuming this will be done via your query for the combobox.

  3. #3
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    509
    it would be like this:
    if the data source from a table was
    - chop meat
    - meat
    - expensive meat

    and in that table was a logical field call [premium_pricing_Y/N]
    ...I've been asked if the list in the combo box could somehow visually flag any of the items that tested TRUE for [premium_pricing_Y/N]

    Alternately, I could add a field to the combo that read like this
    =iif([premium_pricing_Y/N],"$$$", "")

    but graphically (since my actual project has nothing to do with meat ... it's only that I haven't yet eaten lunch, and I'm hungry -LOL), a more graphical approach would make more sense...

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Conditionally Formatting for a Combobox only applies to the selected Value after it has been selected. You cannot format individual selections/rows when the cbo is dropped down, which sounds like what you're asking.

    The usual workaround, if something like this is just 'has to be done,' is to use a small Datasheet View Form to simulate a Listbox, and use Conditional Formatting to to change BackColor/FontColor on Columns to indicate whatever. You can then use Double-Clicking on one or more Columns to indicate the 'selected' value and do whatever you want to with the selection.

    I've got to tell you that this is involves a lot of work, with you having to custom code a lot of things that a Combobox does more or less automatically, and you really need to look at whether the result is worth all the labor that is going to be involved.

    Linq ;0)>

  5. #5
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    509
    exactly what I needed to know
    (and exactly what I was expecting to hear -although I do admit that the details of the work-around had yet to reveal themselves to me....!!!)

    thnx,
    Mark

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

Similar Threads

  1. Conditional number format
    By terryvanduzee in forum Forms
    Replies: 1
    Last Post: 07-14-2011, 01:29 AM
  2. conditional format problem in access
    By bold01 in forum Access
    Replies: 2
    Last Post: 02-10-2011, 11:35 AM
  3. Conditional format for Null date
    By azaz in forum Forms
    Replies: 1
    Last Post: 12-27-2010, 03:11 AM
  4. Advanced Report Conditional Format
    By MrHoliday in forum Forms
    Replies: 2
    Last Post: 08-25-2010, 11:58 PM
  5. Conditional Format Query
    By Schwagr in forum Queries
    Replies: 3
    Last Post: 03-20-2006, 02:39 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