Solved

Quesry to find only Null fields

Posted on 2011-03-15
4
328 Views
Last Modified: 2012-05-11
I am trying to query a table and find only those records that have a null in the Proj_ID field

the end of SQL statement is
WHERE (((tblLocalProject.[Proj_ID])=Nz([Proj_ID])));

what this returns is all records that don't have a null

0
Comment
Question by:ChuckRush
  • 2
4 Comments
 

Author Comment

by:ChuckRush
ID: 35140471
Sorry abotu the typing -- multi-tasking -- Query!
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 125 total points
ID: 35140493
select * from
tblLocalProject
where tblLocalProject.[Proj_ID] Is null
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Access MVP)
DatabaseMX (Joe Anderson - Access MVP) earned 125 total points
ID: 35140575
To also cover the case of Empty String ("") as well as Null ... you can use:

WHERE Nz([tblLocalProject].[Proj_ID] , "") = "" 
0
 

Author Closing Comment

by:ChuckRush
ID: 35140620
Thanks Guys! I was using isnull()   and it was an issue
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question