Conditional Formatting code Question

  • Thread starter Thread starter Dave Elliott
  • Start date Start date
D

Dave Elliott

I have a drop down list that use either Employee Checks or Hourly Contractor
Checks for the criteria,
I would like for the color of the field to change to lets say red if the
value is Employee Checks.
I tried using Field Value is and Equal to "Employee Checks"
this did not work ???
It worked on another form that does not use a combo!
The name of the control is Combo32 it's control source is EmpOrCon


Any Suggestions?
 
What is the Row Source for the combo box? What is the bound column type

If the Row Source is a table and there are two fields that has data like this

ID CheckType
--- -------------------------------
1 "Employee Checks
2 "Hourly Contractor Checks

The row source for the combo box has two columns, ID (integer) and CheckType (text) and the first column (ID) is the bound column, the integer value is stored, even if what you see is "Employee Checks"

You have to set the conditional format condition to: (don't forget change the formatting

for "Employee Checks" => Field Value is Equal to
for "Hourly Contractor Checks" => Field Value is Equal to


HT

Stev
 
The Row Source is a Table/Query with (5) choices;
Hourly Contractor Checks
Per Job Contractor Checks
Employee Checks
Reimbursement
Misc.






SteveS said:
What is the Row Source for the combo box? What is the bound column type?

If the Row Source is a table and there are two fields that has data like this:

ID CheckType
--- --------------------------------
1 "Employee Checks"
2 "Hourly Contractor Checks"

The row source for the combo box has two columns, ID (integer) and
CheckType (text) and the first column (ID) is the bound column, the integer
value is stored, even if what you see is "Employee Checks".
 
Dave

I made a table using your values and a form with a combo box with the row source set to the table (I also tried a query). I set the conditions to Field Value is Equal to "Employee Checks" and the font to Bold White on Red background. The only way I could make it not display white/red when "Employee Checks" was selected was to misspell "Employee" or "Checks". Having two or more spaces between the words would also faile to change the format to white/red

Have you tried setting a conditional format for "Reimbursement"? Since it is a single word (no spaces), only misspelling the word should make it fail to change format

BTW, I am using W2K and A2K
Stev
 
Steve, figured it out, I had to use the queries vale of (1) for Employee
Checks and (2) for Hourly Contractor Checks.
Thanks,

Dave


SteveS said:
Dave,

I made a table using your values and a form with a combo box with the row
source set to the table (I also tried a query). I set the conditions to
Field Value is Equal to "Employee Checks" and the font to Bold White on
Red background. The only way I could make it not display white/red when
"Employee Checks" was selected was to misspell "Employee" or "Checks".
Having two or more spaces between the words would also faile to change the
format to white/red.
Have you tried setting a conditional format for "Reimbursement"? Since it
is a single word (no spaces), only misspelling the word should make it fail
to change format.
 
Back
Top