Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reading the previous record in a report.

Status
Not open for further replies.

diwin

Technical User
Nov 29, 2002
218
CA
Can you apply conditional formatting on one field in a report based on the value of a field in the previous record?

Daniel Dillon
O o . (<--- brain shrinking at rate shown.)
 
You can do something like:

Code:
Option Explicit

Dim LastValue As String

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If LastValue = "S" Then
    Me.Surname.BackColor = vbRed
Else
    Me.Surname.BackColor = vbWhite
End If

'& "" in case of nulls

LastValue = Me.Surname & ""

End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top