Solved

VBA Conditional Formatting of a Field

Posted on 2006-11-16
2
275 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

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…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

695 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