Results 1 to 3 of 3
  1. #1
    Gioconno89 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2019
    Posts
    1

    Merging of Spares with the same P/N in 1 Table

    Dear All,
    Good Afternoon.

    I just started today to use Microsoft Access.

    I need to write a query able to merge the spare parts contained in my Table that have the same Part Number.


    The query should also update the quantity everytime a record with the same part number is found.

    Any suggestions?

    Thank you in advance for the support

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    make Q1 that counts all the spare PN:
    select PART#, count(Part#) from tSpares

    this is a make table query and write results to a temp table: tPartCounts

    make Q2 an update query, that joins the main table , tParts, with tPartCounts on Part#
    add the Qty:

    update tParts Set tParts.Qty = tParts.Qty + tPartCounts.Qty where tParts.Part# = tPartCounts.Part#

  3. #3
    DaveT99 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    76
    Hi Gioconno89
    Nice to see someone else using MS Access for spares related activities. Do you want to connect on Linkedin my link is www.linkedin.com/in/davidthompsonreliability

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

Similar Threads

  1. Replies: 16
    Last Post: 02-09-2017, 03:48 PM
  2. Merging 2 rows in different table..
    By ndcruz in forum Queries
    Replies: 2
    Last Post: 03-16-2015, 10:42 AM
  3. Replies: 1
    Last Post: 01-09-2015, 05:15 PM
  4. Merging fields in a table
    By Bx Snipe in forum Access
    Replies: 1
    Last Post: 09-24-2012, 01:45 PM
  5. Replies: 8
    Last Post: 11-04-2009, 04:22 AM

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