Results 1 to 3 of 3
  1. #1
    lalprasad is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Oct 2017
    Posts
    2

    how to simplify this query..............plz help

    Others: Count(IIf([P1_Master]![Teacher_Region]<>"Hyderabad",0)+(IIf([P1_Master]![Teacher_Region]<>"bangalore",0)+(IIf([P1_Master]![Teacher_Region]<>"Delhi",0)+(IIf([P1_Master]![Teacher_Region]<>"Chennai",0)+(IIf([P1_Master]![Teacher_Region]<>"Mumbai",0)+(IIf([P1_Master]![Teacher_Region]<>"pune",0)+(IIf([P1_Master]![Teacher_Region]<>"ROI",0)+IIf([P1_Master]![Remark]="mini kit",0))))))))



    this is to find if i have entered any city name wrongly.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Maybe:

    SELECT * FROM P1_Master WHERE Remark="mini kit" AND NOT Teacher_Region IN ("Hyderabad", "Bangalore", "Delhi", "Chennai", "Mumbai", "Pune", "ROI");

    Otherwise, build a table with the valid city names and join it to Teacher_Region in a Find Not Matched query - there is a query wizard for that.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    lalprasad is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Oct 2017
    Posts
    2

    Thumbs up

    Quote Originally Posted by June7 View Post
    Maybe:

    SELECT * FROM P1_Master WHERE Remark="mini kit" AND NOT Teacher_Region IN ("Hyderabad", "Bangalore", "Delhi", "Chennai", "Mumbai", "Pune", "ROI");

    Otherwise, build a table with the valid city names and join it to Teacher_Region in a Find Not Matched query - there is a query wizard for that.

    thank you

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

Similar Threads

  1. Simplify VBA Code
    By bytreeide in forum Programming
    Replies: 3
    Last Post: 05-27-2015, 02:36 PM
  2. Replies: 1
    Last Post: 04-01-2014, 10:33 AM
  3. Replies: 4
    Last Post: 02-11-2014, 05:37 PM
  4. Help To Simplify My Code
    By graviz in forum Programming
    Replies: 2
    Last Post: 09-11-2013, 07:58 PM
  5. Need help to simplify this process
    By shanea.kr in forum Access
    Replies: 1
    Last Post: 07-10-2012, 01:40 PM

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