Results 1 to 2 of 2
  1. #1
    rebfein's Avatar
    rebfein is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2015
    Location
    So Cal
    Posts
    114

    Problems with returning blank fields for certain records query

    Hi there,



    I'm having a problem creating a query for a particular set of records with blank fields. Please let me know where I'm going wrong (and keep in mind that I don't know SQL).

    Situation:
    I need to create a list of a certain set of parts (about 8 sub-categories out of 40) that return a blank field for the manufacturer name. The table itself totals over 11 thousand records. I'm estimating that the records without a name in the manufacturer field totals ~ 800. Here's a picture of the query design:
    Click image for larger version. 

Name:	Query 1 - design.png 
Views:	11 
Size:	73.8 KB 
ID:	27613

    1. I selected Create>Queries>Query Design, and added the table name.
    2. From there I selected three fields I wanted for the query; our PN, the MFG Part and the manufacturer name (MFG)
    3. In the KGS PN column, criteria, I added a statement to look for part numbers that begin with the following letters; CC, CE, DR, DZ, IC, QF, QP or QS.
    4. In the MFG column, I added = "IS NULL"
    5. I pressed the Run button; and here are the results:
    Click image for larger version. 

Name:	Query 2 - returns.png 
Views:	10 
Size:	48.5 KB 
ID:	27614

    So where did I go wrong?

    Thank you for any assistance you can give me,

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    If you want to return Null values for field MFG, just use:
    Code:
    Is Null
    in your criteria.

    The way you wrote it, since you put in between quotes, it is looking for a literal string that says "IS NULL".

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Query is excluding records with blank fields
    By Menelaus in forum Queries
    Replies: 1
    Last Post: 03-28-2013, 08:14 PM
  2. Query not returning records
    By Daryl2106 in forum Access
    Replies: 2
    Last Post: 11-28-2012, 09:29 AM
  3. Replies: 6
    Last Post: 04-26-2012, 10:00 PM
  4. Query Not Returning Null Fields
    By mgmirvine in forum Queries
    Replies: 2
    Last Post: 10-28-2011, 06:15 PM
  5. Query returning fields not chosen
    By cam2era in forum Queries
    Replies: 5
    Last Post: 03-23-2011, 11:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums