PC Review


Reply
Thread Tools Rate Thread

color text in report

 
 
shwan
Guest
Posts: n/a
 
      7th May 2010
I have a 3 text (High , Normal , Low ) in filed bound to txt.remark filed , I
want in print out [txt.remark] appear in a diffrent color depending on value
in feild [Result] , I tried to do this but i couldn't this the code that I
write it

Dim txt_Remark As String

Private Sub Report_Current()

Select Case txt_Remark
Case "low"
Me.txt_Remark = vbred
Case "normal"
Me.txt_Remark = vbBlack
Case "high" 'used brakets because two words
Me.txt_Remark = vbred
End Select

End Sub

Please I want some one help me to correct this
 
Reply With Quote
 
 
 
 
fredg
Guest
Posts: n/a
 
      8th May 2010
On Fri, 7 May 2010 14:42:01 -0700, shwan wrote:

> I have a 3 text (High , Normal , Low ) in filed bound to txt.remark filed , I
> want in print out [txt.remark] appear in a diffrent color depending on value
> in feild [Result] , I tried to do this but i couldn't this the code that I
> write it
>
> Dim txt_Remark As String
>
> Private Sub Report_Current()
>
> Select Case txt_Remark
> Case "low"
> Me.txt_Remark = vbred
> Case "normal"
> Me.txt_Remark = vbBlack
> Case "high" 'used brakets because two words
> Me.txt_Remark = vbred
> End Select
>
> End Sub
>
> Please I want some one help me to correct this


Use conditional formatting instead of code.
Select the [txt_Remark] control.
Click on Format + Conditional Formatting
Set Condition1 to
Field Value is
as Condition enter
equal to "medium"
Select the Black color
Click on the Add button

Set Condition2
to
Expression is
write in the next dialog box:
[txt_Remark] = "high" or [txt_Remark] = "low"
Select the red color
Save the changes.


--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing text color and textbox color on Access Report Cindy Microsoft Access Reports 0 1st Dec 2010 05:15 PM
Change Color Of Text Box In Report zyus Microsoft Access 2 27th Apr 2010 03:38 AM
Change text color in report stumpy Microsoft Access Reports 2 27th Dec 2007 07:12 PM
change the text color in the report cdolphin88@yahoo.co.uk Microsoft Access Reports 3 15th Sep 2006 02:25 PM
Change row or text box color in report Darby Holmes Microsoft Access Reports 2 30th Jan 2004 08:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:20 PM.