?
Solved

Conditional Formatting

Posted on 2013-12-03
2
Medium Priority
?
256 Views
Last Modified: 2013-12-04
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
0
Comment
Question by:deefel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 39694406
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.
0
 
LVL 61

Accepted Solution

by:
mbizup earned 400 total points
ID: 39694408
If you want part type to exactly match the word "Extended", then use this for your expression instead:

[Forms]![frmMainForm]![[parttype] =  "Extended"

Open in new window

0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question