Results 1 to 3 of 3
  1. #1
    Jerseynjphillypa is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Apr 2012
    Posts
    83

    How To force a Null if Criteria doesn't exisit


    I have a the fields called Name, State and City in a table. The criteria I am filtering for is for "NJ" in [State], but if "NJ" is not in the table, I want the [City] to be "NA".

  2. #2
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    if (object)= "NJ" then
    else
    (object) = "NA"
    end if

    That seems to be the logic your trying to achieve.. if you have a bit of code I can look into it further.

  3. #3
    Jerseynjphillypa is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Apr 2012
    Posts
    83
    That's what I am looking for but don't know how to code it SQL.

    Thanks for you help
    Attached Files Attached Files

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

Similar Threads

  1. Query criteria with values and null
    By robsworld78 in forum Queries
    Replies: 13
    Last Post: 03-27-2012, 05:44 AM
  2. Replies: 1
    Last Post: 02-23-2012, 02:27 PM
  3. Replies: 3
    Last Post: 01-15-2012, 11:05 PM
  4. Replies: 2
    Last Post: 01-03-2011, 05:17 PM
  5. Replies: 1
    Last Post: 03-29-2010, 10:23 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