Results 1 to 2 of 2
  1. #1
    iuianj07 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    2

    Query Criteria help needed

    Hello guys,

    I have a query that for example---



    I have this Indexing_Loan_Status table:

    Situs_ID Analyst InStChID
    298 user 1
    298 user 10
    298 user 11
    303 user 1

    And I have a query that whenever a Situs_ID have InStChID = 10, then the whole Situs_ID shouldn't show up, the SQL is:

    SELECT T1.Situs_ID, T2.Analyst, T2.InStChID
    FROM Job_Tracking As T1
    LEFT JOIN Indexing_Loan_Status As T2
    ON T1.Situs_ID = T2.Situs_ID
    WHERE T1.Situs_ID Not In
    (SELECT DISTINCT T3.Situs_ID
    FROM Indexing_Loan_Status As T3
    WHERE T3.InStChID = 10)
    And T2.Analyst = getuserName()


    although I am trying to add something and couldn't figure out...

    So basically what this query does is if the InStChID = 10, then that Situs_ID 298 shouldn't appear anymore... but when I add another record for Situs_ID 298 with InStChID = 11, then I would want it to show up in the query again... then... when another record is added for Situs_ID 298 with InStChID = 16, then it should not appear on the query again...

    I know it may be confusing, so I will try to explain the query:

    I am working in a Job Tracking database... and what this query does is it returns a set of records that the user has worked on the Situs_ID... the InStChID is the "status" of each record, where InStChID = 10 actually means "Indexing (job is called) Sent to Client", and so when we create this status then it should not show up anymore in the query... but there is a possibility that the Client will send it back to us for additional work, when that happens we go back to Situs_ID record and add another status InStChID = 11 which actually means "Redaction Request Received" then that's the time it should show up in the query again so that the user can work on it. then after the user finishes the additional work, the user will add another status InStChID = 16 which means "Redaction Sent to Client" then it shouldn't show up in the query anymore...

    I hope it lessen up the confusion, and I would really appreciate your help...

    Thank you

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    in query design view;
    in the column; InStChID
    in the 'Criteria' field put: <>10

    run query

    hope this helps.

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

Similar Threads

  1. Help needed with Query...
    By showmak in forum Queries
    Replies: 4
    Last Post: 09-10-2010, 07:23 PM
  2. help needed with a query calculation
    By ginglis in forum Queries
    Replies: 1
    Last Post: 04-14-2010, 10:36 AM
  3. Query help needed asap!!
    By msaccess09 in forum Queries
    Replies: 1
    Last Post: 02-25-2009, 09:39 PM
  4. Noob Query Help Needed
    By fenster89411 in forum Queries
    Replies: 0
    Last Post: 01-11-2009, 09:47 AM
  5. Replies: 0
    Last Post: 01-01-2007, 02:26 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