Conditional Formating

  • Thread starter Thread starter george
  • Start date Start date
G

george

Hi,

Is it possible using conditional formating to set the
ForeColor property of a combobox depending on the value of
another combobox on the same form?

thanks in advance, george
 
if me.cbo1="whatever" then
me.cbo2.forecolor=vbred
else
me.cbo2.forecolor=vbblue
endif

You'll want that in the after update event of cbo1 and, if it's a single
form, then in the current event of the form so that the format is set when
you move from record to record.
 
george said:
Is it possible using conditional formating to set the
ForeColor property of a combobox depending on the value of
another combobox on the same form?


As long as you can live with the limit of three conditions,
yes. Just use the Expression Is option instead of Value Is.

As Rob said, this is only really needed on a continuous or
datasheet form. Code is more versatile for a single view
form.
 
Back
Top