Conditional formatting works in one report but not in another (1 Viewer)

mikenyby

Member
Local time
Today, 12:00
Joined
Mar 30, 2022
Messages
85
This has really stumped me....

I have two identical reports, "School Search by Name" and "School Search by Address". The only difference between them is the parameters used to load the reports. Three fields in each report are conditionally formatted to appear the same colour as the background (ie become invisible) based on the value of another field. Here's the expression I'm using for two fields [School Website] and [School Phone Number]:

Expression is [Status_SchoolStatus]="Closed"

And for the other field [Closing Date]:

Expression is [Status_SchoolStatus]="Currently Active"

I've gone through the data and format properties of the [Status_SchoolStatus] field as well as the conditionally formatted fields, but I can't find any discrepancies. And yet, my conditional formatting works fine in "School Search by Name" but not at all in "School Search by Address".

What could possibly be going wrong here?

I should mention that I've only been working with Access for about six months and I am not good at coding. I may have a lot of questions. Please accept my preemptive apologies.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:00
Joined
Oct 29, 2018
Messages
21,358
Hi. Are you able to share a sample db showing the problem?
 

mikenyby

Member
Local time
Today, 12:00
Joined
Mar 30, 2022
Messages
85
Hi. Are you able to share a sample db showing the problem?
I'm afraid I'm not sure how to do that, the database is too large for me to attach to the message here. If you are willing to let me know how I might share a sample database I'd be happy to oblige.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:00
Joined
Oct 29, 2018
Messages
21,358
I'm afraid I'm not sure how to do that, the database is too large for me to attach to the message here. If you are willing to let me know how I might share a sample database I'd be happy to oblige.
You could try creating a blank database and import the two reports to compare. To make sure they open, you can include a small set of test data.
 

mikenyby

Member
Local time
Today, 12:00
Joined
Mar 30, 2022
Messages
85
Thanks, attached.....buuuuuuut the conditional formatting works just fine in the sample database???? Something must be awry elsewhere in my database to create this problem. And now to make matters worse the conditional formatting isnt' working in either of my reports in my complete database.
 

Attachments

  • Sample Database - Conditional formatting.accdb
    1.8 MB · Views: 264

theDBguy

I’m here to help
Staff member
Local time
Today, 09:00
Joined
Oct 29, 2018
Messages
21,358
Thanks, attached.....buuuuuuut the conditional formatting works just fine in the sample database???? Something must be awry elsewhere in my database to create this problem. And now to make matters worse the conditional formatting isnt' working in either of my reports in my complete database.
Have you tried doing a C&R? If you have backup copies, check if the reports work on them or not.
 

mikenyby

Member
Local time
Today, 12:00
Joined
Mar 30, 2022
Messages
85
Again, I'm sorry for the novice questions. What's a C&R?
 

mikenyby

Member
Local time
Today, 12:00
Joined
Mar 30, 2022
Messages
85
Welp, I made a backup and did a Compact & Repair and it didn't solve the issue. BUT the conditional formatting works perfectly on the backup copy I made. Additionally a code that mysteriously stopped working properly on the database works perfectly on the backup.

I don't know how it fixed itself in the backup, but your advice indirectly solved my issue. Cheers!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:00
Joined
Oct 29, 2018
Messages
21,358
Welp, I made a backup and did a Compact & Repair and it didn't solve the issue. BUT the conditional formatting works perfectly on the backup copy I made. Additionally a code that mysteriously stopped working properly on the database works perfectly on the backup.

I don't know how it fixed itself in the backup, but your advice indirectly solved my issue. Cheers!
Make another backup, just in case. :)
 

Users who are viewing this thread

Top Bottom