Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2002

    Unanswered: text color in a report

    i have a calculated percent displayed in a report. i need the actual number to appear black/bold if it is positve, and red/bold if it is negative. the VB ForeColor, and Font properties do not seem to be supported here. any suggestions would be helpful.

  2. #2
    Join Date
    Dec 2002


    say if your % field in the reprot is 'Value' then the following code in Detail_Format will work fine:

    Me!Value.FontBold = True
    If Me!Value > 0 Then
    Me!Value.ForeColor = RGB(0, 0, 0)
    Me!Value.ForeColor = RGB(255, 0, 0)
    End If

    In the report design mode,
    1. select the section in which this percentage value is printed (Detailed section or Page Header etc.,)
    2. right click the section (not the field 'value') and select properties
    3. Go to 'Event' tab.
    4. select '...' for On Format event
    and this will directly take you to the MS Vb editor with function Detail_Format function code generated.

    Good Luck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts