Access conditional formatting based on unbound combobox


I have an access form with a subform that's a datasheet.

On the main form, there is a combobox which I use to change views. Changing the combobox changes which records show in the datasheet subform (by using VBA to change the SQL).

I also have conditional formatting in the subform, to change the color of certain records.

Here's what I'm trying to do, and can't figure out how:
My users want me to set the conditional formatting logic so that when the combobox on the main form is set to a certain value, different records get their color changed.

I've set up the logic in the conditional formatting box, but it does not work properly. I also noticed that it treats the name of the combobox like a field (by putting brackets around it) - maybe that's the problem?

I know my logic is okay, because I tried it out in the immediate window.

Am I doing something wrong?

Here is my expression in case it helps
([TicklerDate]>Date()) Or (([Location]<>getuser()) And ([me].[parent].[filtercombo]=8))

LVL 10
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.

I believe you need to use the full form reference in the Conditional Formatting window.

"Me" is a VBA identifier, and does not work in queries, property sheets, etc  -- just in the VBA editor.

([TicklerDate]>Date()) Or (([Location]<>getuser()) And (Forms!YourMainFormName!filtercombo=8))

Open in new window

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
etech0Author Commented:
That did the trick. Thanks - I was going crazy from this!
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.