Results 1 to 3 of 3
  1. #1
    pullinmyhair is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2014
    Location
    Colorado
    Posts
    2

    Query to Find Unique Field Entry with Criteria From Other Fields

    The main table for the database I am working on is set similar to what follows:

    ID Mfr Control
    Number
    Initial or
    Follow-Up
    Follow-up


    Number
    Suspect Date of Initial
    Email
    Date Received Date Submitted Date of Report Serious Brief Description Causality Notes
    49 2013DK Follow-up 1 45 9/17/2014 9/17/2014 Non-serious
    8 2014AU Initial 22 8/6/2014 Serious
    9 2015AU Initial 7 8/6/2014 8/1/2014 8/8/2014 8/6/2014 Serious
    10 2015AU Follow-up 1 7 8/6/2014 8/8/2014 8/8/2014 8/8/2014 Serious

    In plain English what I am trying to do is get any records that have had an initial report made but no follow-up (with additional criteria I will explain below).

    I am trying to build a query and keep getting hung up on the unique aspect of fields. I started by trying to query only "Mfr Control Number" fields that are unique (no duplicates). As best I can figure for some reason I can not add any additional fields to that query. My current query is set up in the query build table such that I have added "Mfr Control Number" in two columns. The first column in Total I have "Group By". In the next column I have set Total to "count" with a criteria of 1. If I try to add any other fields from my table than I seem to lose those unique results. But I need to further filter to get the exact information I need.

    • I want criteria on the "Initial or Follow-up" field to only bring "initial"
    • I want criteria on the "Serious" field to only bring "serious"
    • I want criteria on the "Date of This Report" field of "<Date()-"15""


    Is there some way to take the results of that initial query to then build a another query based just on those records? I could then apply the further criteria and run my report. Or is there a way to do this in one step?

    I've tried to make clear my intention but know it can be difficult to get this kind of stuff down in writing in a clear fashion. I have to be careful to keep information confidential also so some of the details are vague. Any advice you can offer is greatly appreciated!

    Thanks!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Build Q1 to get your initial list, then
    Build Q2 that has Q1 in it and set critiera there.

    You may need sub queries to get your data.

  3. #3
    pullinmyhair is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2014
    Location
    Colorado
    Posts
    2
    Thanks for your response ranman256. Unfortunately, I have no idea where to go from the results of the first query that brings me the unique Mfr Control Number. I guess I have only built simpler queries in the past with no links to other queries. If I build a new query based on query 1 I won't have all he fields I need. Can you offer some more assistance on how to link these?

    Thanks!

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

Similar Threads

  1. Replies: 3
    Last Post: 09-06-2014, 01:25 PM
  2. Reading fields in querydef - how to find criteria
    By aytee111 in forum Programming
    Replies: 4
    Last Post: 05-08-2014, 03:44 PM
  3. Using Subform entry as criteria in a Query
    By bdicarlo1 in forum Access
    Replies: 2
    Last Post: 11-14-2012, 06:49 PM
  4. Query Criteria: Unique Number
    By efleming in forum Access
    Replies: 1
    Last Post: 05-24-2011, 03:16 PM
  5. Replies: 3
    Last Post: 06-04-2010, 12:47 PM

Tags for this Thread

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