Here's one way to handle it with a minimal amount of code. It's probably not the most elegantly conceived approach, but it works.
-Use the Find Duplicates query wizard to build a query.
-In design view, change this query into a Make Table query. Add a new column to the query and type in the expression 'Flag: 1'
-Build another query, sorted on the field containing the potential duplicates, that includes all the fields you want to report on from your Original table in addition to the Flag field from the Duplicates table created by the query above. LEFT JOIN the Original table to the Duplicates table on the primary keys. (It will probably be Option 2 in the Join type dialog box, that is, include all records from your Original table and only those from the Duplicates table where the primary keys are equal.)Base your report on this query.
-Include the following code behind your report:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Flag = 1 Then
' if this record is included in the duplicates table
Me.Detail.BackColor = vbYellow
' or whatever highlight color you want
Else
Me.Detail.BackColor = vbWhite
End If
End Sub
Private Sub Report_Open(Cancel As Integer)
' shuts off warning messages when table is created
'each time query is run
With Application
.SetOption "Confirm Record Changes", False
.SetOption "Confirm Document Deletions", False
.SetOption "Confirm Action Queries", False
End With
DoCmd.OpenQuery "NameOfYourMakeTableQuery"
'turns warning messages back on
With Application
.SetOption "Confirm Record Changes", True
.SetOption "Confirm Document Deletions", True
.SetOption "Confirm Action Queries", True
End With
End Sub
Note: on the report, you'll probably want to set the Flag control's visible property to 'No'.
Hope that makes sense.