Report conditional formatting based on recordset comparison

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    #1

    Report conditional formatting based on recordset comparison

    My report is based off of a table. I need a record on the report to be
    highlighted if that record ID is in a different table. Something like,
    if record ID exists in Query X, then conditional format this entry on
    the report.

    Any suggestions?
  • Reggie

    #2
    Re: Report conditional formatting based on recordset comparison

    John, Could use something like this placed in the On Format event of the detail section in your
    report (Air Code)

    Private Sub Detail_Format(C ancel As Integer, FormatCount As Integer)
    Dim intX as Integer
    intX = DCount("[recordID]", "RecordTabl e", "[recordID] = " & Me.recordID)

    If intX > 0 Then
    Me.Detail.BackC olor = 65535
    Else
    Me.Detail.BackC olor = 16777215
    End If
    End Sub

    --
    Reggie

    ----------
    "John" <soundneedle@ho tmail.com> wrote in message
    news:90fab935.0 408130807.27554 1c4@posting.goo gle.com...[color=blue]
    > My report is based off of a table. I need a record on the report to be
    > highlighted if that record ID is in a different table. Something like,
    > if record ID exists in Query X, then conditional format this entry on
    > the report.
    >
    > Any suggestions?[/color]


    Comment

    Working...