Conditional formatting combo box rows

  • Thread starter Thread starter Laurel Eppstein
  • Start date Start date
L

Laurel Eppstein

Hi, I've read all the posts about CF, and have not seen a solution to
this need:

I have a combo box consisting of 4 columns, rowsource is a query.
I am interested on changing the formatting of the displayed rows based
upon the contents
of ONE of these columns. I've tried using the column() property of
the combo box
as the "field value is" on which to format, but this does not work.
Maybe I'm just not
wording it correctly, although I've tried every permutation I can think
of.

Has anyone succeeded with this?

Steve Lebans' enhanced listbox does not address this need.

Thank you all for your help.

Laurel
 
not sure exactly what your formatting goal is. i tried using Conditional
Formatting on a combo box using the following Expression (instead of Field
Value Is):

MyCombo.Column(number)="my specific value"

to set the control to Bold, Red font when choosing the droplist record that
included that specific value. it does *not* conditionally set the formatting
*in the droplist* - such as making one record appear bold and red when you
drop the list. what it does do is to change the control's font to Bold, Red
when the record containing that value *is selected* from the droplist.

hth
 
Thank you, Tina. What I'm trying to do is color rows conditionally,
when the list is dropped, to make it easier to see groups:

column1 column2
A one
A glue
A hair
B score
B jar
C etc

All rows with "A" in column1 would be a different color than rows having
"B" or "C,", etc. I've tried using an expression such as you mentioned,
using the column property, but nothing happened.

-Laurel
 
no, my solution won't do anything to "specific rows in the droplist itself". maybe somebody else will notice my "not solved" in subject line, and be able to help.
good luck.

Thank you, Tina. What I'm trying to do is color rows conditionally, when the list is dropped, to make it easier to see groups:

column1 column2
A one
A glue
A hair
B score
B jar
C etc

All rows with "A" in column1 would be a different color than rows having "B" or "C,", etc. I've tried using an expression such as you mentioned, using the column property, but nothing happened.

-Laurel

tina wrote:

not sure exactly what your formatting goal is. i tried using Conditional
Formatting on a combo box using the following Expression (instead of Field
Value Is):

MyCombo.Column(number)="my specific value"

to set the control to Bold, Red font when choosing the droplist record that
included that specific value. it does *not* conditionally set the formatting
*in the droplist* - such as making one record appear bold and red when you
drop the list. what it does do is to change the control's font to Bold, Red
when the record containing that value *is selected* from the droplist.

hth


Hi, I've read all the posts about CF, and have not seen a solution to
this need:

I have a combo box consisting of 4 columns, rowsource is a query.
I am interested on changing the formatting of the displayed rows based
upon the contents
of ONE of these columns. I've tried using the column() property of
the combo box
as the "field value is" on which to format, but this does not work.
Maybe I'm just not
wording it correctly, although I've tried every permutation I can think
of.

Has anyone succeeded with this?

Steve Lebans' enhanced listbox does not address this need.

Thank you all for your help.

Laurel
 
Laurel said:
Hi, I've read all the posts about CF, and have not seen a solution to
this need:

I have a combo box consisting of 4 columns, rowsource is a query.
I am interested on changing the formatting of the displayed rows based
upon the contents
of ONE of these columns. I've tried using the column() property of
the combo box
as the "field value is" on which to format, but this does not work.
Maybe I'm just not
wording it correctly, although I've tried every permutation I can think
of.

Has anyone succeeded with this?

Steve Lebans' enhanced listbox does not address this need.


There is no facility to color separate rows in a combo box's
drop drop list.

You may be able to simulate what you want by using a subform
in continuous view.
 
Laurel,

You can't do it in a combobox!

A way to do it is to use a continuous form in place of your combobox. Make the
continuous form a subform. You will be able to conditionally format each row in
the continuous form. To make a selection, add code in the Click event of any
field in the continuous form. If you need multiselection, add a field named
Selected to your table and make it Yes/No. It will show as a checkbox on your
form. You then do some action on all records where Selected is True.
 
Can't be done...period.
A couple of alternatives:

1) See how I used SPACE and "*" chars to group selections in a Combo.
http://www.lebans.com/commandbars.htm
The custom rowsource function looks complicated but it's not.


2) Use a Subform with CF.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Thanks to all for your input. I'm re-thinking the whole process now,
and may just move to a subform within my subform!

-Laurel
 
Back
Top