How do I specify different properties for the same control field?

G

Guest

So, this is what I'm trying to do:

Put emphasis if a certain record contains a certain value in one of the
fields.

I am using Continuous to display all the records from a Query in my form. If
a certain Record contains, say, Cancel, in a specified field, I want to
change the Fore Color of that record's text to Red. For the other records, I
want all the text to stay black.

I have tried using Conditional Formatting, but that is not flexible enough
(say, if it sais CAncel, it would not format... and you can't use Wildcards.)

Are the controls indexed for different records, so that I could target
textboxalpha for Record1 as opposed to textboxalpha for Record0?

If not, can anyone else suggets a remedy to my problem? Thanks.
 
A

Al Camp

PhoeniX Skye,
You must have a problem with your conditional formatting statement.
I tested the following CF...

FieldValue Equalto "Cancel" (red bkgrnd white text)

"cancel" or "CaNCel" or "CANCEL" all caused the proper formatting to occur.
 
G

Guest

I guess I must've made an error when i inputted the test values. But the main
disadvantage of conditional formatting is that you cannot use wildcard
characters. In my case, it is a 'Comment's field, so Cancel would be used in
conjunction with other comments.

I guess I could define another column in the database to Boolean the Cancel
status, but I would rather find out how to code for specific records' fields,
since there exists more conditions than the one I inquired about.
 
F

fredg

I guess I must've made an error when i inputted the test values. But the main
disadvantage of conditional formatting is that you cannot use wildcard
characters. In my case, it is a 'Comment's field, so Cancel would be used in
conjunction with other comments.

I guess I could define another column in the database to Boolean the Cancel
status, but I would rather find out how to code for specific records' fields,
since there exists more conditions than the one I inquired about.

Regading > and you can't use Wildcards.)<

Who says?
Wildcards work just fine with conditional formatting.

Set the Condition1 to
Expression Is
As the expression write:
[Comments] Like "*Cancel*"

If you have additional criteria just use the And or Or operators and
add the criteria:
[Comments] Like "*Cancel*" AND ([Comments] Like "*Smith*" OR
[Comments] Like "*Jones*")

will format the control if both Cancel and (Smith or Jpnes) are in the
field.
 
G

Guest

It says so when I searched for Help in Access on the topic, but I guess using
Expressions is a way around that.

Thank you very much!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top