473,385 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How do I format a field in a report based upon the results in another field.

Situation is: I have a report that has a field that will be formatted based upon the results in another field. For example if 'Field 2' equals "IBR" 'Field 1' would be formatted with – italics, bold, red font. ‘Field 2’ could equal up to 6 different results changing the font of ‘Field 1’ accordingly. I know this needs to be done by coding but not sure how.

Thank you for the help.
Sep 24 '10 #1
5 7580
patjones
931 Expert 512MB
You can use conditional formatting to accomplish this; it won't require you to use code (although it might be possible to use code - but why complicate things?).

Open the report in design view, click on the field that you want to format (Field 1), and in the Conditional Formatting pop up pick Expression Is, then type [Field 2] = "IBR". Select the formatting option appropriately.

Let us know how it works.

Pat
Sep 24 '10 #2
Thanks for the assistance, however this will only work if you have 3 or less conditions. I have at least 6 different conditions.

Thx
Sep 24 '10 #3
Thanks for the assistance, however this will only work if you have 3 or less conditions. I have at least 6 different conditions.

Thx
Sep 24 '10 #4
patjones
931 Expert 512MB
That's why you use the "Expression Is" option, and then type your criteria into the box next to the drop down - which can be as complicated as need be. This is all done on one line.

Pat
Sep 24 '10 #5
patjones
931 Expert 512MB
For example, in my test database I have the conditional formatting on the ERN (Employee Reference Number) field set to [DOB] >= #1/1/1970# And [last name] = "JONES". You can use as many other fields and conditions as you want by typing in the expression just under "Condition 1". It isn't necessary to add other lines.

Pat
Sep 24 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: D Denholm | last post by:
I am a Access newbie... Hopefully somebody can help me figure this out. I have a database that looks like: Asset Economic Minimum ----- ---------------- 10555 ...
3
by: Edward | last post by:
ACCESS 2k I need to design a report based on a rota system for staff at various shops. The data is effectively stored in a single table, along the lines of: Initials (e.g. BH, FG, RM etc.)...
6
by: geronimo_me | last post by:
Hi, I'm trying to compare two TITLE fields from different tables to locate anomolies - however Table1 TITLE field contains a dot(.) after some of the entries, however i want to remove the dot so...
9
by: geronimo_me | last post by:
Hi, I am atempting to compare part of a field with the whole of another field in access. Is this possible? Basically I have 2 tables with the following info: Table1 Field1 = MR.
7
by: MN | last post by:
I am using a program called IDWorks which is reading and writing to an MS Access format database. The IDWorks program can't adjust the formatting on a displayed field in a way that we need so I...
9
by: sellcraig | last post by:
Microsoft access 2 tables table "data main" contains a field called "code" table "ddw1" is created from a make table query of "data main" Goal- the data in "code" field in needs to...
17
by: amanda27 | last post by:
Can anyone help me. I have a database that has a form. On the form I have a subform that brings in some data that is relevant to the data on the main form but from a week before (status of projects...
3
by: jej1216 | last post by:
I have a form in which a select field lists 5 items pus the option of "Other." I want a text field to be hidden unless the select field value is "Other." The form is HTML, but I am assuming that I...
4
by: sade | last post by:
I want to select a column if data starts with a specific letter OR else to select from another column instead. Something like replacing columns. For example: 1st row to read columns ID, NAME if...
5
beacon
by: beacon | last post by:
Hi everybody, I'm putting a database together at work for a committee, but one of their requirements is giving me trouble. They want a table and a form that will track trips made by patients at...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.