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

Posted on 2011-04-19
Last Modified: 2012-05-11
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.
Question by:kensai11
    LVL 13

    Accepted Solution


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

      First([Tag]) AS TagText
      ID, First([Tag])
      ID = ID2

    LVL 67

    Expert Comment

    This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time! Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to…
    If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now