[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

MS Access Query: Display First of, second of, third of a field

I'm new to Access but proficient with Office otherwise, so please bear with me.

I have a simple, two table set up for a doc database


The First Table:
ID   Title  Author  Category  Date

Second Table:
ID2   Tag

ID2 is connected to ID which is the primary key of table one. The second table holds multiple entires for each single ID number, one for each separate tag used to describe the document.

When querying records, I can create columns that will display the first tag and the last tag for each record, but not any of the tags inbetween. Is there a simple way to do this?

I can set it up to show all tags, but then the output has multiple entries per ID number, and I need a single row per record.

Sorry if this doesn't make sense and let me know what I can clarify.
0
kensai11
Asked:
kensai11
1 Solution
 
AielloJCommented:
kensai11:

Access' Crosstab query is designed for this.  The query below should be a good foundation for what you're trying to accomplish.

TRANSFORM
  First([Tag]) AS TagText
SELECT
  ID, First([Tag])
FROM
  FirstTable
 INNER JOIN
  SecondTable
 ON
  ID = ID2
GROUP BY
  ID
PIVOT
  ID2


Regards,
AielloJ
0
 
QlemoC++ DeveloperCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now