Conditional Format Is Not Value

RiskyP

Registered User.
Local time
Today, 23:00
Joined
Jan 3, 2013
Messages
27
Hi,

Have searched all over but cannot find. Is there a way to apply a conditional format if field value is not more than 1 value. For instance I seem to remeber there being an IsNot statement along with an OR statement, however this does not seem to work with conditional formatting

Thanks
 
Hello Risky, could you explain your requirement in simple words? You can use Not operator to negate the condition you are checking..
Code:
? Not 10 = 10    [COLOR=SeaGreen]'will return False, when 10 is equal to 10[/COLOR]
 
Apologies - rushed my question

I have a place name field - i would like the conditional format to apply a colour if the place name is not either of the 3 defined places

For instance - [My-Field] Not Or("Place1","Place2","Place3")

Thanks

Hello Risky, could you explain your requirement in simple words? You can use Not operator to negate the condition you are checking..
Code:
? Not 10 = 10    [COLOR=seagreen]'will return False, when 10 is equal to 10[/COLOR]
 
Could you give some example?? Just explain what you want to do.. do not worry about technical words or representation..
* PlaceName is it a Control Name? (i.e. is it a text box/combo box)
* What control are you trying to apply the conditional format for?
 
I assume you are using a Form, but what type.

Single, Continious or Datasheet.

It would be good if you put your Windows and Access versions in your signature.

Different versions have different capabilities.
 
Certainly -

The Place name is brought into the report from the master table by a textbox called Place Name. There is Just one textbox but the value could be anything that the user has entered.

I am trying to apply change in the background colour of a seperate empty texbox if the Place name text box value does not equal either of the 3 pre defined places (Place 1,2 or 3) These pre defined values will be manually written into the conditional formatting code

Thanks


Could you give some example?? Just explain what you want to do.. do not worry about technical words or representation..
* PlaceName is it a Control Name? (i.e. is it a text box/combo box)
* What control are you trying to apply the conditional format for?
 
Apologies - did not specify - I am using a form based directly from a table in my databse

And will add signiture - but for reference in this thread i am using Access 2010/Windows 7

I assume you are using a Form, but what type.

Single, Continious or Datasheet.

It would be good if you put your Windows and Access versions in your signature.

Different versions have different capabilities.
 
Thanks for that.

I don't have 2010 so I can't help too much.

But to help others help you what type of form are you using.
 
So is not as simple as just using a <> operator??
Code:
If (Me.[COLOR=Blue]ctrlName[/COLOR] <> "Place1" OR Me.[COLOR=Blue]ctrlName[/COLOR] <> "Place1" OR Me.[COLOR=Blue]ctrlName[/COLOR] <> "Place1") Then
    [COLOR=SeaGreen]'your code to format[/COLOR]
End If
Blue bits need to change..
 
Thanks a lot - Turns out you where sort of there. Shall post for other users;
As it is using the conditional formatting 'wizard' under expressions the code would be;

Code:
[Place Field]<>"Place1" AND [Place Field]<>"Place2".....and so on


So is not as simple as just using a <> operator??
Code:
If (Me.[COLOR=blue]ctrlName[/COLOR] <> "Place1" OR Me.[COLOR=blue]ctrlName[/COLOR] <> "Place1" OR Me.[COLOR=blue]ctrlName[/COLOR] <> "Place1") Then
    [COLOR=seagreen]'your code to format[/COLOR]
End If
Blue bits need to change..
 
...texbox if the Place name text box value does not equal either of the 3 pre defined places (Place 1,2 or 3) These...
My bad.. I did not give much thought to what I read.. I just looked at Place1, 2 Or 3.. which made me put OR.. re-read your post to find it was different..
 

Users who are viewing this thread

Back
Top Bottom