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

pull null value from either of the two columns or both columns

P: 2
I am doing a query in access. I want to pull all the clients names that have a null value in two separate columns. I want everyone pulled that has a null value in either of the two columns or both of the columns. When I put "is Null" in both of the columns, it is only pulling clients names who are null in both columns. If a client is null in just one or the other column it does not pull them. I want it to pull everyone who is null in either of the columns or both of the columns
May 11 '10 #1

✓ answered by NeoPa

In your query grid, notice there is a row below the Criteria: one that reads Or:.

If you put the criteria for one column against the Criteria: row and the criteria for the other against the or: row then it will select records where either of the columns is blank.

NB. Multiple levels of OR can be handled this way by using the rows beneath.

Share this Question
Share on Google+
4 Replies


missinglinq
Expert 2.5K+
P: 3,532
There's probably a slicker way, but this works, assuming the columns are both Text:
  1. In the Query Design Grid, create a calculated field: CombinedColumns:Nz([Column1]+[Column2],"EmptyField")
  2. Leave the "Show" checkbox unticked.
  3. In the Criteria Box enter: = "EmptyField"
Welcome to Bytes!

Linq ;0)>
May 11 '10 #2

NeoPa
Expert Mod 15k+
P: 31,186
In your query grid, notice there is a row below the Criteria: one that reads Or:.

If you put the criteria for one column against the Criteria: row and the criteria for the other against the or: row then it will select records where either of the columns is blank.

NB. Multiple levels of OR can be handled this way by using the rows beneath.
May 12 '10 #3

P: 2
@NeoPa
Thank you so very, very much. I did it and it worked! Thanks a million!!!
May 12 '10 #4

NeoPa
Expert Mod 15k+
P: 31,186
Not a problem K. That's what we're all here for :)
May 12 '10 #5

Post your reply

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