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
234 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
  • 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
 
LVL 65

Expert Comment

by:rockiroads
ID: 16904282
typo in my last post, but Im sure you catch the drift
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now