Solved

Acess Report - compare two fields and if they are different, change the formatting of one of the fields

Posted on 2006-06-14
8
244 Views
Last Modified: 2006-11-18
I have a report which has a few amounts in each record.  I would like to compare the amounts and if they are different, the 2nd field should change to be italicized.

How do I do this?

Thanks.
0
Comment
Question by:YLaw
[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
  • 4
  • 3
8 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 16904235
have u tried conditional formatting?

0
 
LVL 77

Expert Comment

by:peter57r
ID: 16904250
Hi YLaw,
Use conditional formatting on the textbox you want to change.(Right click>Conditional Formatting)
Pete
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 16904268
alternative is this

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

    If Amount1 > Amount2 Then
        Amount1.FontItalic = True
    Else
        Amount.FontItalic = False
    End If
End Sub
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 65

Expert Comment

by:rockiroads
ID: 16904282
typo in my last post, but Im sure you catch the drift
0
 

Author Comment

by:YLaw
ID: 16904313
rockiroads,

I've never used conditional formatting.  Which one would be better.  That or the detail_format?
0
 
LVL 65

Accepted Solution

by:
rockiroads earned 500 total points
ID: 16904434
well the detail_format is easier if you don't know conditional formatting

But its always good to learn
when u go into conditional formatting (either click on control, then go to Format/Conditional formatting or right click/Conditional Formatting)

u select your conditon

Field Value is

2nd combo is greater than

and so on


0
 

Author Comment

by:YLaw
ID: 16944830
sorry not to sound really dumb...I can't find where it says conditionally formatting (Sorry it's taken so long to get back to you)
0
 

Author Comment

by:YLaw
ID: 16944850
whoops...I thought you meant the control's format tab...I got it.  Great. thanks.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

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…
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.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

734 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