Conditional Formatting - Text Disappears When Highlighted

  • Thread starter Thread starter JWeaver
  • Start date Start date
J

JWeaver

I have a Comment field on a report that I want highlighted if certain text
appears anywhere within it. The text shown below could be at the beginning
of the field or on a different line within the Comment field. When I use the
Conditional Formatting setting below, the field is highlighted but the text
shown within the quotes does not show. I know it is there because there is a
line where it should be but no text is visible on the line. What is causing
this?

Expression is: [Comments/Notes] Like "*NMT 5 hours per day.*"

When I use the same Conditional Formatting above without the "*" at the
beginning and end of the expression, and the expression within the quotes is
the ONLY thing within the Comment field, then the field is highlighted and
text shows up.

Any help would be appreciated!!
 
Thanks, Al.

Unfortunately, the same thing happens when I use your expression.
Everything that is in the text field before the expression I want shows but
the expression itself does not.
--
JWeaver


Al Campagna said:
JWeaver,
Try...
[Comments/Notes] Like "*" & "NMT 5 hours per day." & "*"
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

JWeaver said:
I have a Comment field on a report that I want highlighted if certain text
appears anywhere within it. The text shown below could be at the
beginning
of the field or on a different line within the Comment field. When I use
the
Conditional Formatting setting below, the field is highlighted but the
text
shown within the quotes does not show. I know it is there because there
is a
line where it should be but no text is visible on the line. What is
causing
this?

Expression is: [Comments/Notes] Like "*NMT 5 hours per day.*"

When I use the same Conditional Formatting above without the "*" at the
beginning and end of the expression, and the expression within the quotes
is
the ONLY thing within the Comment field, then the field is highlighted and
text shows up.

Any help would be appreciated!!
 
JWeaver,
I'm confoosed...
You wrote...
Everything that is in the text field before the expression I want shows
but
the expression itself does not.

Can you give us a couple of simple examples?
Here's what I have... (example Comment text)...
this is what I want to happen using Conditional Formatting.

I set up the following test...
A memo field ([MemoField]) with this text string...
"kj jh ak akh aj ABC ajksdh ajk ajk kjah ak kad akjdh
aslkj j jaas kjlaljakl dhajhah kj ajsh ajshd hja kasjh"
My Conditional Formatting...
Expression is [MemoField] Like "*" & "ABC" & "*"
(turn the backcolor yellow)
This test succefully changes the background color of MemoField to yellow
if "ABC" is
anywhere in the string, and I see all the text of MemoField (as above)

Actually, using your original Like "*ABC*" syntax works too.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


It seems as though you only want to highlight the text control if the ONLY
value it con
JWeaver said:
Thanks, Al.

Unfortunately, the same thing happens when I use your expression.
Everything that is in the text field before the expression I want shows
but
the expression itself does not.
--
JWeaver


Al Campagna said:
JWeaver,
Try...
[Comments/Notes] Like "*" & "NMT 5 hours per day." & "*"
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

JWeaver said:
I have a Comment field on a report that I want highlighted if certain
text
appears anywhere within it. The text shown below could be at the
beginning
of the field or on a different line within the Comment field. When I
use
the
Conditional Formatting setting below, the field is highlighted but the
text
shown within the quotes does not show. I know it is there because
there
is a
line where it should be but no text is visible on the line. What is
causing
this?

Expression is: [Comments/Notes] Like "*NMT 5 hours per day.*"

When I use the same Conditional Formatting above without the "*" at the
beginning and end of the expression, and the expression within the
quotes
is
the ONLY thing within the Comment field, then the field is highlighted
and
text shows up.

Any help would be appreciated!!
 
Al,

I apologize. I made an error and didn't put the asterisk within quotes.
Once I did this, it worked perfectly. Thanks for your help!

--
JWeaver


Al Campagna said:
JWeaver,
I'm confoosed...
You wrote...
Everything that is in the text field before the expression I want shows
but
the expression itself does not.

Can you give us a couple of simple examples?
Here's what I have... (example Comment text)...
this is what I want to happen using Conditional Formatting.

I set up the following test...
A memo field ([MemoField]) with this text string...
"kj jh ak akh aj ABC ajksdh ajk ajk kjah ak kad akjdh
aslkj j jaas kjlaljakl dhajhah kj ajsh ajshd hja kasjh"
My Conditional Formatting...
Expression is [MemoField] Like "*" & "ABC" & "*"
(turn the backcolor yellow)
This test succefully changes the background color of MemoField to yellow
if "ABC" is
anywhere in the string, and I see all the text of MemoField (as above)

Actually, using your original Like "*ABC*" syntax works too.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


It seems as though you only want to highlight the text control if the ONLY
value it con
JWeaver said:
Thanks, Al.

Unfortunately, the same thing happens when I use your expression.
Everything that is in the text field before the expression I want shows
but
the expression itself does not.
--
JWeaver


Al Campagna said:
JWeaver,
Try...
[Comments/Notes] Like "*" & "NMT 5 hours per day." & "*"
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

I have a Comment field on a report that I want highlighted if certain
text
appears anywhere within it. The text shown below could be at the
beginning
of the field or on a different line within the Comment field. When I
use
the
Conditional Formatting setting below, the field is highlighted but the
text
shown within the quotes does not show. I know it is there because
there
is a
line where it should be but no text is visible on the line. What is
causing
this?

Expression is: [Comments/Notes] Like "*NMT 5 hours per day.*"

When I use the same Conditional Formatting above without the "*" at the
beginning and end of the expression, and the expression within the
quotes
is
the ONLY thing within the Comment field, then the field is highlighted
and
text shows up.

Any help would be appreciated!!
 
Back
Top