Solved

VBA Conditional Formatting of a Field

Posted on 2006-11-16
2
274 Views
Last Modified: 2011-04-14
Hello -

I have a query that returns all orders.  I run a report off that query that has an AuthString MEMO field.  I only want the AuthString field in the report to be visible and change the font to red when a certain condition is met.  

the valid authstring field looks like this (do not display on report):
"Auth: 00456, Transaction: 12345, 1: This transaction has been approved.; avs: Y; cvv: M"

The invalid data in the authstring field looks like this (display on report and turn RED):
Auth: , Transaction: , 1: There was a problem with this transaction.; avs: n; cvv: n
(notice no auth # or transaction # and the message is completely different)

When the report opens and shows ALL orders, for the invalid data I want to be able to display the whole AuthString field  WHERE LIKE "*There was a problem with this transaction*" and change the color of the text to red.  

ELSE

do not display the AuthString field

Thanks for the help

0
Comment
Question by:dbeller
[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 58

Accepted Solution

by:
harfang earned 500 total points
ID: 17961864
Hello dbeller

Select the textbox and choose "conditional formatting" from the menu. Use "Expression" and type:

    [AuthString] Like '*problem*'

Then, format in red and you are done.

(°v°)
0
 
LVL 58

Expert Comment

by:harfang
ID: 17961870
No, wait, you don't want the field at all when there is no problem? Then it's not conditional formatting, but conditional hiding (unless the default font is white on white, of course).
Which is it?
(°v°)
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Omit After Update event 5 41
Microsoft Access VBA - allocate a colour 3 66
Reoccurring Access Query 24 39
how to get hundreds part from the number 1 28
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

738 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