Link to home
Start Free TrialLog in
Avatar of DeeDee Baldwin
DeeDee BaldwinFlag for United States of America

asked on

Conditional Formatting

I have a mainform with an Object called [parttype’ and a subform form with an object called [DiscPL1] and need to do some conditional formatting on [DiscPL1] if [Partype] file’s value is  like “Extended”.
I am using the “conditional formatting” function in MS Access 2007.  Below is what I have that isn’t working.  
IIF ([Forms]![frmMainForm]![[parttype] Like "Extended",[DiscPL1].BackColor  = #ED1C24)

Could I please get help in getting the [DiscPL1] object to change the back color from blue to red if the condition is meet.  thanks
Avatar of mbizup
mbizup
Flag of Kazakhstan image

By Like, do you mean containing the word Extended?


- Right-click the DiscPL1 control in design view and select "Conditional formatting..."

- Select "Expression IS " from the drop down list

- Enter the following expression in the textbox provided:

     
  Instr(1, [Forms]![frmMainForm]![[parttype], "Extended") > 0

Open in new window


- Then select the color you want to see when that condition is met.
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial