A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

HELP: Conditional Formatting with more then 3 conditions



 
 
Thread Tools Display Modes
  #31  
Old November 14th, 2008, 07:41 PM posted to microsoft.public.access.reports
angie
external usenet poster
 
Posts: 314
Default Conditional Formatting with more then 3 conditions


i have entered the following code in the OnFormatEvent of the Detail section:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Select Case Me.category
Case "A"
Me.client.BackColor = 12632256
Case "B"
Me.client.BackColor = 12632256
Case "C"
Me.client.BackColor = 12632256
Case Else
Me.client.BackColor = 16777215
End Select

Select Case Me.category
Case "dat"
Me.client.FontUnderline = yes
Case Else
Me.client.FontUnderline = no
End Select

End Sub

but i get the formatting only with the back color, not with the font
underline. have i done something wrong with the code?

Ο χρήστης "Wayne Morgan" *γγραψε:

Yes, in the Format event of the section of the report that the field is
reported in, you could set the formatting of the control for that field. A
Select Case statement may be the easiest.

Example:
Select Case Me.txtMyTextbox
Case "AB"
Me.txtMyTextbox.ForeColor = 8454143
Case 'etc
Case Else
Me.txtMyTextbox.ForeColor = 0
End Select

--
Wayne Morgan
MS Access MVP


"Tim" wrote in message
...
ACCESS 2000

There is a field in my database that requires highlighting; however, I
have
a total of 15 cases that requires, obviously I can't set that up with the
default C.F.

Is there a way to set up a VBA code that would allow me to set up the 15
conditions?




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
conditional formatting in form slows down calculations Susan Using Forms 5 June 13th, 2005 11:24 AM
Conditional Formatting Error ddate Worksheet Functions 0 May 5th, 2005 09:00 PM
Conditional Formatting Anomaly Rutgers_Excels General Discussion 1 November 1st, 2004 09:43 PM
Freezing Conditional Formatting Ashish Chamaria Worksheet Functions 3 December 19th, 2003 11:54 AM
Conditional formatting with formula Ann Scharpf Worksheet Functions 5 October 21st, 2003 04:29 AM


All times are GMT +1. The time now is 11:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.