Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2008
    Posts
    59

    Unanswered: How can I make data from a query the headings of a new query?

    I wasn't sure how to describe this problem, as I'm not sure of the technical terminology. I will explain what I am after though.

    I have 3 tables as so:

    1. tbl_classes
    student_ID
    course_ID
    student_name

    2. tbl_surveys
    survey_ID
    survey_name
    course_ID

    3. tbl_surveys_completed
    survey_ID
    response_ID
    student_ID

    I also have a query which lists all the surveys but has one extra field where it generates a yes or no, as to whether the survey has been completed.

    Okay, my question is how can I create a query so that for each course I can create a list of all the students and whether they have completed the surveys or not?

    To do this it would need to do one thing that I don't understand. For a start the query would generate data for just a certain 'course_ID' field. There would then be a number of headings. The first would be the student name. But then the other headings would be all the surveys which relate to that particular course, so it would need to search the 'tbl_surveys' table for all entries that match the 'course_ID' and then make these headings. How could I do this?

    I would then want all the entries to bring the 'completed' field from the query, so that at a glance I could look at the table and see the student's name and then whether each of the surveys has been completed or not.

    Does this make sense? If anyone has any inkling of what I am asking and feels they might be able to help, please let me know.

    Thanks
    Russ

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    You might need to look carefully at crosstab queries.

    Disclaimer: I didn't read the topic, just the title - extreme lack of time
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •