Results 1 to 3 of 3
  1. #1
    cirix20 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2017
    Posts
    5

    Access Query Help

    I have a very large Table with inventory adjustments by location ID



    Table set up example is

    Location_ID, Date, Item_Number, Item_Desc, Adjustment_Code, QTY, Dollars

    What i am needing to do is run a query to see if any of the Item numbers in the table that were adjusted out of inventory (Negative QTY), were later Adjusted back into Inventory (Positive QTY).

    Im trying to see if they are taking items out of inventory as an "OOS" Adjustment Code and Later Adjusting it back in as a "CC" Code or other code

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    For a start, consider:

    SELECT * FROM table WHERE Item_Number IN (SELECT Item_Number FROM table WHERE Qty <0) ORDER BY Item_Number, [Date];
    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
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    @cirix20 - be aware that "Date" is a reserved word (and a built in function) in Access and shouldn't be used as an object name. Better might be "TransactionDate" or "TransDate".

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

Similar Threads

  1. Replies: 2
    Last Post: 05-19-2020, 11:55 AM
  2. Replies: 3
    Last Post: 07-08-2019, 04:23 PM
  3. Replies: 2
    Last Post: 03-26-2019, 12:40 PM
  4. Replies: 2
    Last Post: 10-07-2015, 12:28 PM
  5. Replies: 3
    Last Post: 04-24-2012, 08:32 AM

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