ms/access form conditional format no functioning

Hi
On my app I have a multi-record form where I want to highlight the current cell . For this I am using the Conditional Format of ms/access as per the screenshots below

Screen-Shot-2018-02-17-at-13.24.08.png
for this, on the cell I am using the conditional formula:

Screen-Shot-2018-02-17-at-13.25.09.png
the fields are OK and named:

Me.frm_txtCurrentPaciente - the field in the upper right (form header, stating the current value

Me.frm_idPaciente - the field in the current record

the formula being
Me.frm_txtCurrentPaciente=Me.frm_idPaciente

but no matter what, the format keeps the same...

can anyone help?
João serras-pereiraAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

als315Commented:
Can you upload sample DB (only this form and related tables/queries)?
0
João serras-pereiraAuthor Commented:
sure! I'll do in a few minutes!
0
mbizupCommented:
Just a note on Syntax... the "Me" prefix is VBA only, and not understood in conditional formatting, queries or form property sheets.  If these are fields, textboxes, or other form controls, try

[frm_txtCurrentPaciente] = [frm_idPaciente]

Open in new window

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

João serras-pereiraAuthor Commented:
Hi... Not yer but (hopefully) closer.....
now ALL instances are colores. Please check the screenshots

Screen-Shot-2018-02-19-at-17.18.00.png
Screen-Shot-2018-02-19-at-17.19.49.png
the top right yellow box contains the comparison field..
0
mbizupCommented:
Ah - are you trying to 'Highlight the current record'?

1.  The textbox in the header section, txtCurrentPaciente, should be unbound (Blank controlsource).
2.  Use VBA code in the form's Current Event to set it's value (you can use the Me prefix here):
Private Sub Form_Current()      
    Me.frm_txtCurrentPaciente = Me.frm_idPaciente
End Sub

Open in new window


3.  In conditional formatting, use the expression (with Brackets and without the Me Prefix):
[frm_txtCurrentPaciente] = [frm_idPaciente]

Open in new window

0
João serras-pereiraAuthor Commented:
well... this is precisely what I am doing.... the code is:

Private Sub Form_Current()

    Call logMe("Form_Current frm_pacienteLista", "start")
    Me.frm_txtCurrentPaciente = Nz(Me.frm_IDpaciente, "0")
    Forms![_intData].frm_pacienteCurRec = Me.frm_txtCurrentPaciente
    Call logMe("Form_Current frm_pacienteLista", "end")

End Sub
0
mbizupCommented:
Ok - for your conditional formatting, ensure that you are using the 'name of the field as it appears in your table' and the 'name of the unbound textbox'

[The ID FieldName From Your Table Design] = [The Name Of the Unbound Textbox in Your Form Header]

Open in new window


Take a look at this sample, paying particular attention to the names of the fields in the table design, the name of the text boxes, and how those names are applied in the conditional formatting.
HighlightCurrentRecord.accdb
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
João serras-pereiraAuthor Commented:
Fount it!
The problem was that the field in the form header was  BOUND!
0
João serras-pereiraAuthor Commented:
thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

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.