Connecting Tech Pros Worldwide Help | Site Map

change data report textbox forecolor

 
LinkBack Thread Tools Search this Thread
  #1  
Old October 4th, 2008, 05:29 PM
Newbie
 
Join Date: Aug 2007
Posts: 2
Default change data report textbox forecolor

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
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.