Re: Multiple Locations
- From: "Duane Hookom" <DuaneAtNoSpanHookomDotNet>
- Date: Fri, 8 Sep 2006 12:09:15 -0500
Try this SQL which assigns the bin sequence using DCount():
TRANSFORM First(tblWhichListsPartNumbers.BIN) AS FirstOfBIN
SELECT tblWhichListsPartNumbers.[Part#]
FROM tblWhichListsPartNumbers
GROUP BY tblWhichListsPartNumbers.[Part#]
ORDER BY tblWhichListsPartNumbers.[Part#]
PIVOT "Bin" & DCount("BIN","tblWhichListsPartNumbers","[Part#]=""" & [Part#]
& """ AND BIN<=" & [Bin]);
--
Duane Hookom
MS Access MVP
"A Boy Named Joe" <ABoyNamedJoe@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:63C2F4A0-C5FC-44F7-ACEB-C40D51227561@xxxxxxxxxxxxxxxx
Good morning MS Community,
I have a table which lists part numbers in the first field and the bin
locations in the 2nd field. Since a part may have more than one bin
locations (up to 5 or 6) , the table looks like this:
PART# BIN
A1 123
A1 456
A2 789
B1
etc....
I'd like to get the information organized into a table like this:
PART# BIN#1 BIN#2 BIN#3....
A1 123 456
A2 789
So there is only one instance of the part number showing all possible bin
locations. Any suggestions?
Thanks,
--
Joe
.
- Follow-Ups:
- Re: Multiple Locations
- From: A Boy Named Joe
- Re: Multiple Locations
- Prev by Date: RE: DO ALL TABLES/FORMS DATA NEED TO BE ENTERED TO CREATE SUBFORMS
- Next by Date: Re: Form view and fields based on query
- Previous by thread: Re: black out row of cells with one cell entry
- Next by thread: Re: Multiple Locations
- Index(es):