Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rows vs Columns - Data Placement

Status
Not open for further replies.

tbassngal

Programmer
Feb 18, 2003
74
US
I am having a very hard time - what I have are some projects that have multiple values per row:

PID QTY Date
12345 100 05/01/05
45678 200 05/02/05
12345 150 04/28/05
12345 175 04/25/05

What I would like to do is have one row with multiple columns:

PID QTY1 Date1 QTY2 Date2 QTY3 Date3
12345 100 5/01/05 150 4/28/2005 175 4/25/2005
45678 200 05/02/05

I don't even know where I begin... can someone please make a suggestion, there are an unknown number of columns... that I guess should be created using a variable of some sort maybe a count of PID?
 
Lookup UNION Query in the Access Help File. That may be one method of accomplishing this.


--
Not until I became a Network Administrator did the error message "See your Network Administrator for assistance" become petrifying.
 
How are ya Mike555 . . . . .

Your talking a [blue]SpreadSheet[/blue] not a databse!

Have you tried [blue]Excel?[/blue]

Calvin.gif
See Ya! . . . . . .
 
Thanks to the both of you for attempting to answer. My manager wants this to be in Access - Not only am I only a beginner to VBA in Access, but I am also a beginner to Excel VBA and haven't used VBA in Excel (to any great length) for a very long time. Do you have an example where you did this in Excel, have you done it personally? I know it sounds very easy... I would have thought that I could somehow capture the point in the array sort of... as a variable. Any other thoughts... I will look into UNION. Any help is appreciated. I am stuck.
 
tbassngal, possibly a sub form.
You want all the records, according to a single/common PID.
Without knowing your application well, I would suggest another table, that holds the QTY & Date values, with a foreign key PID. This will be linked to the main table via the PrimaryKey PID.


If you would like me to elaborate, let me know...

Good luck either way!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top