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
|
|||
|
|||
Show items not null
I have created a query.
SELECT qryItemsWith26Chars.ITEM, qryItemsWith26Chars.DESCRIPTION, qryItemsWith26Chars.[25Char] FROM qryItemsWith26Chars WHERE (((qryItemsWith26Chars.[25Char]) Is Not Null)); However when I run the query all items show even the ones that are null or blank. What can I do to make this work? Thanks Matt -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200807/1 |
#2
|
|||
|
|||
Show items not null
Null is not the same as blank. Null is totally void but blank is a 'zero
lenght string.' Try this -- WHERE qryItemsWith26Chars.[25Char] Is Not Null AND qryItemsWith26Chars.[25Char] ""; -- KARL DEWEY Build a little - Test a little "mattc66 via AccessMonster.com" wrote: I have created a query. SELECT qryItemsWith26Chars.ITEM, qryItemsWith26Chars.DESCRIPTION, qryItemsWith26Chars.[25Char] FROM qryItemsWith26Chars WHERE (((qryItemsWith26Chars.[25Char]) Is Not Null)); However when I run the query all items show even the ones that are null or blank. What can I do to make this work? Thanks Matt -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200807/1 |
#3
|
|||
|
|||
Show items not null
I've also seen cases where spaces made it seem like the field was null. I do
a select query on the field and see if the criteria below returns any records. Even if it returns records with something visible in the field, that could be a problem. Like " *" -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "KARL DEWEY" wrote: Null is not the same as blank. Null is totally void but blank is a 'zero lenght string.' Try this -- WHERE qryItemsWith26Chars.[25Char] Is Not Null AND qryItemsWith26Chars.[25Char] ""; -- KARL DEWEY Build a little - Test a little "mattc66 via AccessMonster.com" wrote: I have created a query. SELECT qryItemsWith26Chars.ITEM, qryItemsWith26Chars.DESCRIPTION, qryItemsWith26Chars.[25Char] FROM qryItemsWith26Chars WHERE (((qryItemsWith26Chars.[25Char]) Is Not Null)); However when I run the query all items show even the ones that are null or blank. What can I do to make this work? Thanks Matt -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200807/1 |
#4
|
|||
|
|||
Show items not null
mattc66 via AccessMonster.com wrote:
I have created a query. SELECT qryItemsWith26Chars.ITEM, qryItemsWith26Chars.DESCRIPTION, qryItemsWith26Chars.[25Char] FROM qryItemsWith26Chars WHERE (((qryItemsWith26Chars.[25Char]) Is Not Null)); However when I run the query all items show even the ones that are null or blank. What can I do to make this work? Blank is different from Null as is a Zero Length String. It's unlikely that you actually have a field with just a space character. OTOH, if the field has it Required and AllowZeroLength properties set to Yes, then you probably have ZLS in those records that appear "blank". You can check for both Null and ZLS by using an expression like: WHERE 25Char & "" = "" -- Marsh MVP [MS Access] |
#5
|
|||
|
|||
Show items not null
Thanks that worked.
KARL DEWEY wrote: Null is not the same as blank. Null is totally void but blank is a 'zero lenght string.' Try this -- WHERE qryItemsWith26Chars.[25Char] Is Not Null AND qryItemsWith26Chars.[25Char] ""; I have created a query. [quoted text clipped - 8 lines] Thanks Matt -- Matt Campbell mattc (at) saunatec [dot] com Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200807/1 |
Thread Tools | |
Display Modes | |
|
|