Wildcards for Conditional Formatting of a text box in a report (1 Viewer)

Gordon

Gordon
Local time
Today, 15:58
Joined
Nov 25, 1999
Messages
34
I have a text box in the page header for a report.

I want to apply conditional formatting to whenever the word "overdue" comes up in that text box.

If I type in the full text for one possible variation, then it works for that variation (i.e. "Overdue from Author). However, I want to have it conditionally format for "Overdue for publishing" or any other variation.

I have tried "*overdue* and *&overdue&*. Neither works.

Any suggestions?
 

ajetrumpet

Banned
Local time
Today, 09:58
Joined
Jun 22, 2007
Messages
5,638
If I type in the full text for one possible variation, then it works for that variation (i.e. "Overdue from Author). However, I want to have it conditionally format for "Overdue for publishing" or any other variation.
Gordon, are you writing the conditional formatting statement in a module?? I think wildcards work the same there...??
Code:
 if me.control LIKE '"*" & "Overdue"', then...
 

Gordon

Gordon
Local time
Today, 15:58
Joined
Nov 25, 1999
Messages
34
Gordon, are you writing the conditional formatting statement in a module?? I think wildcards work the same there...??
Code:
 if me.control LIKE '"*" & "Overdue"', then...

Thanks for the response. I haven't worked with modules, I'm doing this in the standard interface for conditional formatting FORMAT/Conditional Formatting...... I was hoping to find a solution that works in that venue.

Gordon
 

ajetrumpet

Banned
Local time
Today, 09:58
Joined
Jun 22, 2007
Messages
5,638
I'm not even sure how many formatting options it gives you, but I know it does give the true/false option.

I bet you it wouldn't take very long to write a short sub giving the conditions and the formats to use in VB. You could use If, Then, ElseIf....or maybe even SELECT CASE.

Might want to try it, you could learn something interesting about coding in the process too. :)
 

pvs

New member
Local time
Today, 10:58
Joined
Sep 20, 2007
Messages
7
Not sure if this will work for you, but there is a formula named InStr() that might work: If InStr(STRINGEXP,'OVERDUE')>0

InStr() returns the starting location of str2 within within str1, so 0 means str2 isn't in str1 ... any other value means it is. If you need to worry about case, simply convert both using UCase().

-pvs
 

pvs

New member
Local time
Today, 10:58
Joined
Sep 20, 2007
Messages
7
Instr() is a function. ;)

Ahhh yes. THAT'S the word I was looking for. Did you ever have 'one-of-those-moments' where you couldn't find the right word? ;)

So sorry if my reply was confusing to anyone.

-pvs
 

Users who are viewing this thread

Top Bottom