473,326 Members | 2,337 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,326 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 3197
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...

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.