Private Sub Form_Current()
On Error GoTo ErrTrap
' Assign row number to Rank (bound control)
' - if not a new record (This check is meant to
' prevent inadvertant adding of fresh records
' merely by navigating to a new record)
If Me.NewRecord = False Then
Me.Rank = Me.CurrentRecord
End If
' Assign current record nmber to TxtRef
Me.TxtRef = Me.CurrentRecord
' This statement is necessary for clean
' display of color highlights (clearing up
' hangover of previous highlights - if any)
Me.Recalc
' Note - TxtRef is an unbond text box in
' form header or footer, while Rank
' is a bound text box holding row number.
' The following expression is used for
' highlighting the current row through
' conditional formatting:
' ([Rank]=[TxtRef]) Or _
' (Fn_NewRec()=True And [Rank] Is Null)
Me.Parent![fsubFIN].Requery
ExitPoint:
On Error GoTo 0
Exit Sub
ErrTrap:
MsgBox Err.Number & " - " & Err.Description
Resume ExitPoint
End Sub