Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VBA Conditional Formatting of a Field

Posted on 2006-11-16
2
Medium Priority
?
277 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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

610 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