By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,122 Members | 921 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,122 IT Pros & Developers. It's quick & easy.

How To Show All Other Records When Using A Critieria In Query Design?

P: 91

I will give a simple example. I have a table [RuleMap]. It has a field called [Rulename] and[Ruletype]. [Ruletype] has entries like Handbook, Guidance and Legislation. Some of the records do not have the [Ruletype] mentioned against [Rulename].

I have designed a query in the Query design view. I do not want to see the [Rulename] where [Ruletype] is Legislation. I have used "<> Legislation" in the criteris for [Ruletype].

The query is working fine but it is not showing the records [Rulename] where the [Ruletype] is blank.

How do I show all records even where the [Ruletype] is blank?

Please advise.

Apr 27 '12 #1
Share this Question
Share on Google+
3 Replies

P: 91
Got it... I added "Is Null" in the Or field below.
Apr 27 '12 #2

P: 21
Try This Code
Expand|Select|Wrap|Line Numbers
  1. Select *
  2. From RuleMap
  3. Where RuleType Not in ('Legislation')
Apr 29 '12 #3

Expert Mod 15k+
P: 31,419
A clever idea, but unfortunately it doesn't work.

It would be a good idea to indicate, when posting, that you are guessing and haven't actually tested your suggestions. Members generally assume a suggestion has either been tested specifically, or is posted by someone who has a fair set of experience in the subject. If neither of these is true then it's only fair to indicate that in your posts.
Apr 29 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.