Change Object Color per Field Parameters

R

Rod

I have a continuous form with a button that has a little wingdings circle in
it next to each record in the detail section. When one of the fields (a text
box) returns a certain value I want the fore color of the button to change to
red in order to alert the user to click on it.

I've looked at conditional formatting but it doesn't seem to be able to do
the trick (That doesn't mean it can't. It just means that I can't make it).
Can conditional formatting change the forecolor of a button depending on
another field's value? Is there any way to accomplish what I'm trying to do?

Many thanks!
 
A

Allen Browne

In the conditional formatting, choose:
Expression Is
instead of:
Field Value Is

You can then exter an expression comparing Field1 to SomeOtherField like
this:
[Field1] = [SomeOtherField]
 
R

Rod

You can't add conditional formatting to a button.

I tried to add
"IIf([me].[InvID]>999,[me].[but_Alert].[ForeColor]=255,[me].[but_Alert].[ForeColor]=65535)" to the text box but it just ignores the code.

Allen Browne said:
In the conditional formatting, choose:
Expression Is
instead of:
Field Value Is

You can then exter an expression comparing Field1 to SomeOtherField like
this:
[Field1] = [SomeOtherField]

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Rod said:
I have a continuous form with a button that has a little wingdings circle
in
it next to each record in the detail section. When one of the fields (a
text
box) returns a certain value I want the fore color of the button to change
to
red in order to alert the user to click on it.

I've looked at conditional formatting but it doesn't seem to be able to do
the trick (That doesn't mean it can't. It just means that I can't make
it).
Can conditional formatting change the forecolor of a button depending on
another field's value? Is there any way to accomplish what I'm trying to
do?

Many thanks!
 
A

Allen Browne

Quite correct. You must use a text box here if you want the color
conditionally formatted.

You could place the text box with a transparent background on top of the
button if it gives you the visual effect you are after.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Rod said:
You can't add conditional formatting to a button.

I tried to add
"IIf([me].[InvID]>999,[me].[but_Alert].[ForeColor]=255,[me].[but_Alert].[ForeColor]=65535)"
to the text box but it just ignores the code.

Allen Browne said:
In the conditional formatting, choose:
Expression Is
instead of:
Field Value Is

You can then exter an expression comparing Field1 to SomeOtherField like
this:
[Field1] = [SomeOtherField]

Rod said:
I have a continuous form with a button that has a little wingdings
circle
in
it next to each record in the detail section. When one of the fields (a
text
box) returns a certain value I want the fore color of the button to
change
to
red in order to alert the user to click on it.

I've looked at conditional formatting but it doesn't seem to be able to
do
the trick (That doesn't mean it can't. It just means that I can't make
it).
Can conditional formatting change the forecolor of a button depending
on
another field's value? Is there any way to accomplish what I'm trying
to
do?
 
R

Rod

Very creative except that when the text box is over the button I still get
the cursor and not the pointer. Functionaly it works. Thank you.

Allen Browne said:
Quite correct. You must use a text box here if you want the color
conditionally formatted.

You could place the text box with a transparent background on top of the
button if it gives you the visual effect you are after.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Rod said:
You can't add conditional formatting to a button.

I tried to add
"IIf([me].[InvID]>999,[me].[but_Alert].[ForeColor]=255,[me].[but_Alert].[ForeColor]=65535)"
to the text box but it just ignores the code.

Allen Browne said:
In the conditional formatting, choose:
Expression Is
instead of:
Field Value Is

You can then exter an expression comparing Field1 to SomeOtherField like
this:
[Field1] = [SomeOtherField]

I have a continuous form with a button that has a little wingdings
circle
in
it next to each record in the detail section. When one of the fields (a
text
box) returns a certain value I want the fore color of the button to
change
to
red in order to alert the user to click on it.

I've looked at conditional formatting but it doesn't seem to be able to
do
the trick (That doesn't mean it can't. It just means that I can't make
it).
Can conditional formatting change the forecolor of a button depending
on
another field's value? Is there any way to accomplish what I'm trying
to
do?
 
Top