A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Long list of fields, how to check if either is null



 
 
Thread Tools Display Modes
  #1  
Old April 27th, 2010, 12:37 PM posted to microsoft.public.access.queries
atledreier[_2_]
external usenet poster
 
Posts: 22
Default Long list of fields, how to check if either is null

I have a query with 10 fields.

I need the query to return only the records where one of the 10 fields
is NULL. The design window only allow 8 'levels' of criteria...
  #2  
Old April 27th, 2010, 01:15 PM posted to microsoft.public.access.queries
Krzysztof Naworyta
external usenet poster
 
Posts: 80
Default Long list of fields, how to check if either is null

atledreier wrote:
| I have a query with 10 fields.
|
| I need the query to return only the records where one of the 10 fields
| is NULL. The design window only allow 8 'levels' of criteria...

Menu: Insert Rows


--
KN
  #3  
Old April 27th, 2010, 01:21 PM posted to microsoft.public.access.queries
atledreier[_2_]
external usenet poster
 
Posts: 22
Default Long list of fields, how to check if either is null

Well that was easy! :-)

On 27 apr, 14:15, "Krzysztof Naworyta"
wrote:
atledreier wrote:

| I have a query with 10 fields.
|
| I need the query to return only the records where one of the 10 fields
| is NULL. The design window only allow 8 'levels' of criteria...

Menu: Insert Rows


--
KN


  #4  
Old April 27th, 2010, 05:42 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Long list of fields, how to check if either is null

On Tue, 27 Apr 2010 04:37:39 -0700 (PDT), atledreier
wrote:

I have a query with 10 fields.

I need the query to return only the records where one of the 10 fields
is NULL. The design window only allow 8 'levels' of criteria...


32 actually if you insert rows...

One trick (which works with Number or Text fields) to do it in one criterion
uses the fact that the + operator adds numbers, or concatenates strings, but
also propagates NULLS - so you can include a calculated field

AnyNull: [A] + [b] + [C] + [D]

and use a criterion of IS NULL on it. The concatenation will be NULL if any
one of the elements is NULL.
--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.