Conditional Formatting-HELP anyone?!

  • Thread starter Thread starter Adam
  • Start date Start date
A

Adam

I'm trying to set a conditional format on a field that will become disabled
based on the value of another field (which is a drop-down combo box). I'm
choosing the "Expression Is" in the condition set up box and have tried the
following expressions:
[CobmoBox]![Exercise]="No Exercise Today"
[Exercise]="No Exercise Today"
[Forms]![Exercise]="No Exercise Today"
[Forms]![CobmoBox]![Exercise]="No Exercise Today"

and none of them work - IS my expression wrong??
 
Assuming [Exercise] is the name combo box you want to use to enable or
disable a different control, select the control you want to disable if the
value is "No Exercise Today'.

Select Expression Is
Then in the Expression box put
[Exercise]="No Exercise Today"

Then click the Enable/Disable button and it should grey out. Now, when the
combo box names [Exercise] contains the value "No Exercise Today", the
control you selected when you entered the statement should be disabled.
 
If what Dave said does not seem to work, What is the "Name" (in the
name property on the other tab of the field properties)?

That is what should be in the [] of the selection.

Ron
 
I tried this but it still does not work. I get no errors but it just wont
change. I tried seeing if maybe it only takes place with any newly created
records but didnt work. Any other ideas?

Klatuu said:
That is what I tried tp say.
But, that makes it more clear.
--
Dave Hargis, Microsoft Access MVP


Ron2006 said:
If what Dave said does not seem to work, What is the "Name" (in the
name property on the other tab of the field properties)?

That is what should be in the [] of the selection.

Ron
 
Is the combobox bound to a field?

Is what is stored in the field actually "No Exercise Today" or is
it storing instead an ID number of the record that is the basis for
the combobox?

If that is the case then you will have to test for the value of the ID
that corresponds to "No Exercise Today"

Ron
 
I tried a post earlier but it did not seem to show up so I will try
again.


Is the combobox bound to a field?
Is the value that is stored in that bound field "No Exercise Today" or
is it storing the id or key of that entry?

If it is actually storing the ID then you will have to test for the
value of the ID that corresponds with "No Exercise Today"


Ron
 
Ron has a good point. If your combo is a multi column combo and the text
being displayed is not the bound column, it will not work that way. You will
need to use the value of the bound column that relates to the text being
displayed.

I know the concept works, because I tested it before I answered your question.
--
Dave Hargis, Microsoft Access MVP


Adam said:
I tried this but it still does not work. I get no errors but it just wont
change. I tried seeing if maybe it only takes place with any newly created
records but didnt work. Any other ideas?

Klatuu said:
That is what I tried tp say.
But, that makes it more clear.
--
Dave Hargis, Microsoft Access MVP


Ron2006 said:
If what Dave said does not seem to work, What is the "Name" (in the
name property on the other tab of the field properties)?

That is what should be in the [] of the selection.

Ron
 
This worked! It was based on a look up table and stored by ID and displaying
the filed value. THANKS!!
 
Back
Top