Conditional Formatting

Khushalay

Registered User.
Local time
Today, 01:17
Joined
Apr 16, 2016
Messages
180
Hi friends

i want to apply conditional formatting on my report, the fields involved are three: Dont know how to go about it.

Delivery
Check box
Status

I want the status to highlight if the check box is unticked and delivery is Date()+7.

If Delivery is after a week and check box is unticked it is ok, no highlight.

Please help me in achieving this.

Thanks
 
You didn't say which version of Access you're using. If it's 2010, you can do it with the following method.
1. Open the report in design view
2. Select the Status field
3. Go to the Format tab
4. Select Conditional Formatting
5. Click on <New Rule>
6. Select 'Expression Is'
7. Construct the formula you want to apply
8. Choose the colour you want the field to be when this is the case
9. Click on <OK>
 
You can set that up something like I've shown in the image below. I'm not sure if that expression is what you want but you can poke at it in the attached test database until you get it to work as desired.

attachment.php


Edit: As AIc said this only applies if your version has conditional formatting. If it doesn't let us know and I'll see if I can find the nasty way of doing this without it.
 

Attachments

Did exactly the same. The report is as blank as it was earlier. Nothing is working.
 
Then post your database with some sample data, (zip it) + a description how to reproduce your problem.
 
here's sample database I want that if the deliver date is within the next 7 days and Cut is still unticked then status should be highlighted.

I hope I hv explained it well.
 

Attachments

Thanks JHB
but this works here in the sample db I hv made rather all the formatting works here. But the problem is that in the main db none of the formatting works. What could be the reason?
 
Difficult to say, try with one condition at a time, (then combine them together), then you'll find out if something wrong, maybe the date field isn't a date.
Can't you post the real database?
Make a copy of the real database, remove all unnecessary tables, forms etc. and make some fake data, if it is classified data.
 
Last edited:
Tried that already, doesnt work. Lemme send u the original db
 
Made a simple db from scratch and applied formatting, it worked but when tried to apply the exact same formatting on the required db, in vain.

Did compact and repair quite a few times as well.
Thats the only formatting involved. No other formatting has been applied.
 
I've made a new report, now it works, just remember to change some dates to get it lesser as Date()+7.

attachment.php
 

Attachments

  • Shri.accdb
    Shri.accdb
    448 KB · Views: 87
  • Dshri.jpg
    Dshri.jpg
    20.1 KB · Views: 199
Yes, I have variety of dates in the original report. I copied your expression and pasted it in the main db, no change at all.

The same expression works in a new db but not on the main. There is some corruption or some reason, cant figure that out.
 
Try to copy my report into the problem database to see if it works.
If you are not sending the original report/database then I don't know how to help you!!
 
Of course I sent you the original by deleting most of the records and as I dont have Zip and the data is too much to send without zip.'
I deleted that report and query and constructed another one from scratch. Still the problem exists.
Wondering what could be the issue.
 
If you've Windows 8/7 then zip is included in the pathfinder/file folder.
"Send til"="Send to", "Zip -komprimeret mappe" = "Compressed (zipped) folder"
attachment.php
 

Attachments

  • Zip.jpg
    Zip.jpg
    49.7 KB · Views: 147
If you haven't tried it, then create a new database and copy all from the old one into it.
 
Thanks JHB for your time and patience, it finally worked, actually the query/expression was alright but there was some issue with that report. I deleted it n number of times and re created, finally its fully functional now.

Thanks alot
 
Good you got it working finally! :)
 

Users who are viewing this thread

Back
Top Bottom