A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Conditional Formatting-HELP anyone?!



 
 
Thread Tools Display Modes
  #1  
Old April 17th, 2008, 04:56 PM posted to microsoft.public.access.forms
Adam
external usenet poster
 
Posts: 545
Default Conditional Formatting-HELP anyone?!

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??
  #2  
Old April 17th, 2008, 05:09 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Conditional Formatting-HELP anyone?!

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.
--
Dave Hargis, Microsoft Access MVP


"Adam" wrote:

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??

  #3  
Old April 17th, 2008, 09:53 PM posted to microsoft.public.access.forms
Ron2006
external usenet poster
 
Posts: 936
Default Conditional Formatting-HELP anyone?!

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
  #4  
Old April 17th, 2008, 10:30 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Conditional Formatting-HELP anyone?!

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


"Ron2006" wrote:

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

  #5  
Old April 18th, 2008, 02:23 AM posted to microsoft.public.access.forms
Adam
external usenet poster
 
Posts: 545
Default Conditional Formatting-HELP anyone?!

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" wrote:

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


"Ron2006" wrote:

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

  #6  
Old April 18th, 2008, 01:01 PM posted to microsoft.public.access.forms
Ron2006
external usenet poster
 
Posts: 936
Default Conditional Formatting-HELP anyone?!

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
  #7  
Old April 18th, 2008, 01:11 PM posted to microsoft.public.access.forms
Ron2006
external usenet poster
 
Posts: 936
Default Conditional Formatting-HELP anyone?!

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
  #8  
Old April 18th, 2008, 01:25 PM posted to microsoft.public.access.forms
Ron2006
external usenet poster
 
Posts: 936
Default Conditional Formatting-HELP anyone?!

I have tried 3 times to post a reply it does not seem to want to keep
my reply
  #9  
Old April 18th, 2008, 02:31 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Conditional Formatting-HELP anyone?!

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" wrote:

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" wrote:

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


"Ron2006" wrote:

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

  #10  
Old April 21st, 2008, 04:02 PM posted to microsoft.public.access.forms
Adam
external usenet poster
 
Posts: 545
Default Conditional Formatting-HELP anyone?!

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

"Ron2006" wrote:

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:27 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.