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
pull null value from either of the two columns or both columns
Collapse
X
-
There's probably a slicker way, but this works, assuming the columns are both Text:
- In the Query Design Grid, create a calculated field: CombinedColumns :Nz([Column1]+[Column2],"EmptyField ")
- Leave the "Show" checkbox unticked.
- In the Criteria Box enter: = "EmptyField "
Welcome to Bytes!
Linq ;0)> -
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.Comment
-
Thank you so very, very much. I did it and it worked! Thanks a million!!!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.Comment
Comment