Results 1 to 6 of 6
  1. #1
    cbende2's Avatar
    cbende2 is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Location
    Louisiana
    Posts
    370

    Question Returning wrong items

    Hello All,



    I'm having a little trouble with some SQL,

    WHERE (((DistTrackingTable.[Reviewed by ID]) Is Not Null) AND ((DistTrackingTable.[Check Requested by ID])=""));

    My form is still returning Null [Reviewed by ID] records. I'm trying to have only records that are not null in the [Reviewed by ID] field AND records that are blank or null in the [Check Requested by ID] field.\

    Any help will be greatly appreciated!

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Null = Null

    Empty String = ""

    Null does not equal ""

  3. #3
    cbende2's Avatar
    cbende2 is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Location
    Louisiana
    Posts
    370
    So what should I be using for linked number fields? If I set it to "Null" when I open my form, it returns all of my records.

  4. #4
    cbende2's Avatar
    cbende2 is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Location
    Louisiana
    Posts
    370
    Got it, I used <>"" and "" for the criteria, and it's now giving me the correct items.

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    You could possibly have an empty string or a Null in a field of type Number. Depending on what you are after, you may want to validate for three values, Null, 0, and "". (For the purists, I realize Null is not a value)

  6. #6
    cbende2's Avatar
    cbende2 is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Location
    Louisiana
    Posts
    370
    Ok, Ill set those criteria as well! Thanks!

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

Similar Threads

  1. Replies: 4
    Last Post: 06-12-2014, 07:01 AM
  2. Count is returning the wrong count.
    By khughes46 in forum Reports
    Replies: 2
    Last Post: 05-26-2014, 12:46 PM
  3. Items With Which items Most Commonly
    By vansicklej in forum Access
    Replies: 3
    Last Post: 08-10-2011, 11:05 AM
  4. query returning extra items
    By cbrsix in forum Queries
    Replies: 6
    Last Post: 07-05-2011, 02:22 PM
  5. DMax returning wrong value
    By nedbenj in forum Access
    Replies: 7
    Last Post: 10-24-2007, 10:30 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