By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,821 Members | 1,109 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,821 IT Pros & Developers. It's quick & easy.

Conditional formatting question

P: 57
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
Share this Question
Share on Google+
3 Replies

ADezii
Expert 5K+
P: 8,750
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
Expert 100+
P: 1,923
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

P: 57
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

Post your reply

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