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:

ss1
 
the conditional formatting function:

ss2
and the output:

ss3
All records are "current" (!)

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

can anyone help?
João serras-pereiraAsked:
Who is Participating?
 
Jim Dettman (Microsoft MVP/ EE MVE)Connect With a Mentor President / OwnerCommented:
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.

Jim.
0
 
João serras-pereiraAuthor Commented:
Hi Jim -
Thanks

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
Joao
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.