Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Posts
    3

    Unanswered: How to query items that was entered in the previous shift but no entry on current shi

    Here are the fields for my query [ID], [ShiftNumber], [SalesDate], [ProdSerial] and [ProdEndTag]. I'm trying to find how to run query that will giveme ProdSerial that was entred in the previous shift but not current shift in the same Date. Shift numbers are 1-5 and there are about 5 or 6 shifts each day, and forexample if the second shift entred five items and the third shift enters 4 items I would like to see all items that has entry in the second shift but no entry in the third shift. I was thinking query with parameter, but I'm not sure if that is right way to tackle it. Basically all items that got enter in shift has to be enter in the next shift, so I want to be able to catch if some one forgets to enter items that was entred in the previuos shift. I atteched here sample of my data.

    Thanks
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I might just create 3 queries (1 with the criteria to return records for one of the shifts and the other with criteria to return records for the other shift). Then design a 3rd Unmatched Query using the query wizard against the other 2 queries (ie. All the records from qryShiftX which don't match records from qryShiftY). You may have to add in some criteria in the Unmatched query to weed out other unwanted records.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Jul 2009
    Posts
    3
    PkStormy,

    I did with three query and I tested the data and it is working fine, but I have to put two parameter in query and query two the firts is reprot date and the secon is to ask between what shifts forexample if i'm looking form missign items in between shift one and two the parameter first asks what date and then between what shifts. Is there a way to make this little more friendly for the end users.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •