473,411 Members | 2,068 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,411 software developers and data experts.

Conditional formatting question

Hi,

I have a quick question. Is there an option for conditional formatting in access 97? or is it only for access 2000 or higher? I need to change font color in access 97 report depending on the value. Thank you
May 31 '07 #1
3 3202
ADezii
8,834 Expert 8TB
Hi,

I have a quick question. Is there an option for conditional formatting in access 97? or is it only for access 2000 or higher? I need to change font color in access 97 report depending on the value. Thank you
Condiotional Formatting is not built in with Access 97. You would have to resort to VBA code instead.
May 31 '07 #2
puppydogbuddy
1,923 Expert 1GB
Here is an example of what the VBA code might look like. The background color property was used for illustrative purposes., If you wanted to change the font color, you would change the foreground color (ForeColor) property.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Quantity_AfterUpdate()
  2. Select Case CInt(Me.Quantity)
  3.         Case 0 To 10
  4.             Me.Quantity.BackColor = _
  5.                 RGB(150, 150, 200)
  6.         Case 11 To 40
  7.             Me.Quantity.BackColor = _
  8.                 RGB(75, 75, 200)
  9.         Case 41 To 160
  10.             Me.Quantity.BackColor = _
  11.                 RGB(0, 0, 255)
  12.         Case Else
  13.             Me.Quantity.BackColor = _
  14.                 RGB(200, 0, 0)
  15.     End Select
  16. End Sub 
  17.  
Jun 1 '07 #3
Here is an example of what the VBA code might look like. The background color property was used for illustrative purposes., If you wanted to change the font color, you would change the foreground color (ForeColor) property.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Quantity_AfterUpdate()
  2. Select Case CInt(Me.Quantity)
  3.         Case 0 To 10
  4.             Me.Quantity.BackColor = _
  5.                 RGB(150, 150, 200)
  6.         Case 11 To 40
  7.             Me.Quantity.BackColor = _
  8.                 RGB(75, 75, 200)
  9.         Case 41 To 160
  10.             Me.Quantity.BackColor = _
  11.                 RGB(0, 0, 255)
  12.         Case Else
  13.             Me.Quantity.BackColor = _
  14.                 RGB(200, 0, 0)
  15.     End Select
  16. End Sub 
  17.  

Thank you very much....
Jun 1 '07 #4

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

Similar topics

3
by: Jouke Langhout | last post by:
Hello all! For quite some time now, I've got the following problem: Access won't close properly when a user closes the application. An ACCESS process stays active and that process can only be...
4
by: Bradley | last post by:
I have an A2000 database in which I have a continuous form with a tick box. There is also a text box with a conditional format that is based on the expression , if it's true then change the...
8
by: Dimitri Furman | last post by:
Given: Access 2002/2003 A subform in datasheet or continuous view, placed on a tab page (this last may or may not matter) Conditional formatting applied to some controls on the subform - format...
2
by: Von Bailey | last post by:
I have a form where the conditional formatting is set on some fields to bold if certain conditions are met. However, when the conditions are met some of the data that is to bold is either not...
1
by: GGerard | last post by:
Hello Is there a way to use a variable in the Conditional Formatting of a Textbox? Example : I want the background of a textbox in a continuous form to change color when the value of...
8
by: Typehigh | last post by:
I have many text fields with conditional formatting applied, specifically when the condition is "Field Has Focus". Without any events associated with the fields the conditional formatting works...
4
by: midlothian | last post by:
Hello, I have conditional formatting set up on a subform based on a calculated value in the underlying query. For instance, if Sales are >$1000, the query displays "Yes," otherwise it displays...
1
by: dddsssdddsss | last post by:
A comment and a question To anyone who is using conditional formatting, beware that in Access 2007 the color pallette is not the same as the color pallette in Access 2003. So if you have a...
10
by: Lyn | last post by:
Hi, I would like to make a bound text box not visible if it is empty (not just disable it). This option is not available from the standard conditional formatting feature (at least, not that I can...
1
by: Earl Anderson | last post by:
A business colleague and I are collaborating 'long distance' on an applet for work. He is doing the programming and I am doing the business process form design. We had discussed my desire to make...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.