Solved

Conditional Formatting

Posted on 2013-12-03
2
251 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
  • 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 100 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

809 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