• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 28
  • Last Modified:

highlight current record is highlighting ALL records

Ho -
I have a form for which I need to do conditional formatting (the selected record is to be shown different from the unselected records). So I have an invisible field an on the "on current" event I have:

Private Sub Form_Current()

    Me.F113_NumeroProjetoCorrente = Me.F113_NumeroProjeto
    If CurrentProject.AllForms("F91_LoggedUser").IsLoaded Then
        Forms!F91_LoggedUser!F91_NumeroProjetoCorrente = Me.F113_NumeroProjeto
    End If

End Sub

Open in new window

Then, on the fields conditional formatting, I have:

the fields:

the conditional formatting function:

and the output:

All records are "current" (!)

And the top hidden field (shown for teste, is OK)

can anyone help?
João serras-pereira
João serras-pereira
1 Solution
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
Not sure exactly what your doing, but the problem is that a field must be bound (have a controlsource set) in order to be different for each row.

 If not, then Access assumes all rows are the same.

João serras-pereiraAuthor Commented:
Hi Jim -

Actually the field is bound, but your comment pointed me  to the right track!
The hidden field, by my mistake, was also bound (too many Ctrl C/V). And is must NOT be bound! it is perfectly working now!
Thanks again

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now