Connecting Tech Pros Worldwide Help | Site Map

change data report textbox forecolor

  #1  
Old October 4th, 2008, 06:29 PM
Newbie
 
Join Date: Aug 2007
Posts: 2
I am using data report with ms access database. I want to the rptTextbox color to change based on the value of the the recordset field. Eg to appear red if the field is "FAIL" and black if it is "PASS". My code is
cmdShowReport_Click
' '''''''the STATUS field is bound to Text1. """"" rs is recordset
If rs.Fields("STATUS") < 40 THEN
DataReport1.Sections(Section1).Controls("Text1") =vbRed
else
DataReport1.Sections(Section1).Controls("Text1") =vbBlack
End if

It worked for only the first page of the report. For the other pages, the color was red whether or not the STATUS was "FAIL" . (The first RECORD is "fail")

Pls i need help
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
change data report textbox forecolor Fidell answers 0 October 4th, 2008 06:26 PM
Help with error: Object reference... Adriano answers 3 November 21st, 2005 02:30 AM
Can't find object reference Poewood answers 3 November 16th, 2005 10:04 AM
Please help - design support for Simple Texbox control in .Net Compact framework Mobile Boy 36 answers 0 November 16th, 2005 04:57 AM