I have a report with a comments field and I want to have that comments field change color whenever a "keyword" is put into the comments. Thanks in advance.
I have a report with a comments field and I want to have that comments field change color whenever a "keyword" is put into the comments. Thanks in advance.
I'd suggested you're looki at conditional formatting.
https://www.techonthenet.com/access/...nd_format2.php
Cheers,
I tried that and It only highlights after I click on the field. How would I get it do it as soon as the report is created?
Why do you click on a report? It is a report and not a form, right?
Open the report in design view, select the Comments text box, go to Format\Conditional Formatting and add a new rule:
Expression Is (do not choose Field Value Is unless the "keyword" takes the entire Comments field) InStr([Comments],"Keyword")>0 (adjust to fit your needs) and set the background color. It should work when you open the report.
Cheers,
Vlad
Thanks Vlad, but what does 'Unit' come from?
Say the field I was searching is called 'Comment' and the word I was searching for was 'delay'. The expression would be InStr([Comment],"delay")>0 ???Is that correct?
Yes, unit was just an example
I had to change the background style to normal on the field's properties and now it is working correctly. Thanks for your help!
Glad to hear, good luck with your project!
Cheers,