Results 1 to 5 of 5
  1. #1
    loriswanson2014 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    2

    Need to pull the last inventory transaction for each part id


    I am trying to query our inventory transaction table. I want to pull the last inventory receipt for each part id we have. All of my results gave me multiple instances of the part id (received on multiple dates). I used MAX in the transaction date and also tried in the part ID field. Not working...

    thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    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
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    well you state that you used MAX but it did not work; and so that statement has to be explored. What is the db's definition of the "last" inventory receipt? ...as this must be the Max of some field/parameter one would think. If not date then what? perhaps the autonumber key? .....

  4. #4
    loriswanson2014 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    2
    The table has inventory transactions. I want the most recent transaction for each part_id in the table. If there were a receipt each week, then I would want to just see the most current one. I need additional information as well...is it best to do 1 query to get the last transaction and then use that in a query to add details?

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Did the Allen Browne link help?

    It is possible to do this with domain aggregate functions but would be better with nested subquery.
    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.

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

Similar Threads

  1. inventory system transaction form fields
    By xtrareal22 in forum Forms
    Replies: 2
    Last Post: 11-26-2013, 01:06 PM
  2. Replies: 6
    Last Post: 09-10-2013, 08:37 AM
  3. Replies: 1
    Last Post: 02-21-2013, 12:18 AM
  4. How Can export Large table part by part
    By shabar in forum Import/Export Data
    Replies: 2
    Last Post: 02-04-2013, 06:29 AM
  5. Replies: 7
    Last Post: 11-14-2011, 05:59 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