473,386 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

MS Access add up same parts in column and give qty

I have a ms access database that I need the part numbers that are the
same to be added up to give a quantity and the have the locations to
be put together in the same field. Here is an example of what I have:

Part Number Qty Location
162176-001 MAIN01C1
162176-001 MAIN01C1
162176-001 MAIN01C1
162176-001 MAIN01C1
162176-001 MAIN01C1
162176-001 MAIN01C3
148680-001 MAIN01B3
148680-001 MAIN01B4
148680-001 MAIN01B5

And this is what I need.

Part Number Qty Location
162176-001 6 MAIN01C1, MAIN01C3
148680-001 3 MAIN01B3, MAIN01B4, MAIN01B5

Thanks for any help in advance.
gi*@ambry.com
Nov 12 '05 #1
1 3240
gi*@ambry.com (gotcha) wrote in message news:<73**************************@posting.google. com>...
I have a ms access database that I need the part numbers that are the
same to be added up to give a quantity and the have the locations to
be put together in the same field. Here is an example of what I have:

Part Number Qty Location
162176-001 MAIN01C1
162176-001 MAIN01C1
162176-001 MAIN01C1
162176-001 MAIN01C1
162176-001 MAIN01C1
162176-001 MAIN01C3
148680-001 MAIN01B3
148680-001 MAIN01B4
148680-001 MAIN01B5

And this is what I need.

Part Number Qty Location
162176-001 6 MAIN01C1, MAIN01C3
148680-001 3 MAIN01B3, MAIN01B4, MAIN01B5


The PartNumber Qty part is a snap...
qryPartCount:
SELECT tblPartNos.PartNo, Count(tblPartNos.Location) AS PartCount
FROM tblPartNos
GROUP BY tblPartNos.PartNo;

Final Query:
SELECT qryPartCount.PartNo, qryPartCount.PartCount,
fconcatchild("tblPartNos","PartNo","Location","Str ing",[PartNo]) AS
ListParts
FROM qryPartCount;

You need this function to do it...
fConcatChild...
http://www.mvps.org/access/modules/mdl0004.htm
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
3
by: ARobi | last post by:
I have developped an Access database with a lot of coding. The size of the database without data is about 5 meg. I am ready to copy the database to a client PC which already has a legal version...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
21
by: brink | last post by:
I work in the parts department of a new car dealership. We ar frequently asked by customers for fluid capacities and types of thei vehicles. Unfortunately this information is not in our parts...
1
by: scj | last post by:
Hi all, I need to determine the exact type of DateTime column(*) in an Access 97 database. I'm able to do this with an Access 2 database. With ADO.Net and VB.Net (**), I do something like...
17
by: DaveG | last post by:
Hi all I am planning on writing a stock and accounts program for the family business, I understand this is likely to take close to 2 years to accomplish. The stock is likely to run into over a...
8
by: s_wadhwa | last post by:
SELECT DISTINCTROW "01C" AS dummy, Buildings.BuildingNumber, UCASE(Buildings.BuildingName) AS BuildingName, Buildings.MasterPlanCode, Buildings.UniformBuildingCode,...
17
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting...
2
by: Michael Bialowas | last post by:
Hello all, I have been searching the net endlessly and found this ng, so I thought I would give a try. Anyways, I have a few problems I am trying to implement a combo box which presently contains...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.