If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
two null fields?
Hello,
I have two fields in a query, if they both are blank I don't want to see it. But if one or the other is blank I want to see it. Thanks. |
#2
|
|||
|
|||
two null fields?
Gabe
Please keep in mind that "blank" means something different to humans than to Access. If you look at a field or control and don't see anything, you count that as "blank", right? But Access distinguished among three possibilities ... 1. nothing is there == Null; 2. a zls (zero-length string, "") is there == ""; 3. some number of "space"s are there == e.g., " " You probably can't tell the difference by looking, but Access won't consider #2 or #3 if you tell it to look for #1. Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "Gabe" wrote in message news Hello, I have two fields in a query, if they both are blank I don't want to see it. But if one or the other is blank I want to see it. Thanks. |
#3
|
|||
|
|||
two null fields?
"Gabe" wrote in message
news I have two fields in a query, if they both are blank I don't want to see it. But if one or the other is blank I want to see it. In query design, in the Criteria row under the first field, enter: Is Not Null The next row below the Criteria row is titled Or (at the left.) In this Or row, below your 2nd field, enter: Is Not Null If you have other criteria in the query as well, you may need to repeat them on the Or row also to get the results you want. (That's if you want them applied to both cases.) -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. |
Thread Tools | |
Display Modes | |
|
|