UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> How To Do Multiple Criteria For A Not Condition, Access 2013    
 
   
SomekindaVB
post Nov 23 2017, 11:23 PM
Post#1



Posts: 159
Joined: 15-December 16



Hi all,

Seems I'm always running into this problem and I don't know how to resolve it.

So I have a not condition
CODE
If Not rsTable![Field] = "Condition1" Or rsTable![Field] = "Condition2" Then


I ave tried adding the not to condition 2, but that never seems to work either

How do you write a not condition that will return the correct result?

Cheers
Go to the top of the page
 
theDBguy
post Nov 23 2017, 11:45 PM
Post#2


Access Wiki and Forums Moderator
Posts: 71,222
Joined: 19-June 07
From: SunnySandyEggo


What did you want returned, exactly?

What do you get with the following?

If rsTable!Field<>"Condition1" AND rsTable!Field<>"Condition2" Then

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
SomekindaVB
post Nov 26 2017, 05:20 PM
Post#3



Posts: 159
Joined: 15-December 16



Okay that works. Thanks DBGuy. I should have thought of this. I was too fixated on NOT.
Go to the top of the page
 
theDBguy
post Nov 26 2017, 10:00 PM
Post#4


Access Wiki and Forums Moderator
Posts: 71,222
Joined: 19-June 07
From: SunnySandyEggo


Hi,

Glad to hear you got it to work. Good luck with your project.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    13th December 2017 - 02:19 AM