Sort of list within list within list

Discussion in 'Access Forms Coding' started by H. Martins, Apr 9, 2013.

  1. H. Martins

    H. Martins Guest

    Hi.

    I need some hint (Access 2003).

    Simplifying, I have a database that has a table for cities, a table for companies and, as expected, a table for employees.

    Tables are related as: cities has companies, companies have employes.

    How do I do a list of cities / companies / employees as:

    CityX
    Company1
    EmployeeA
    EmployeeB
    Company2
    EmployeeC
    EmployeeD
    EmployeeE
    CityY
    Company3
    EmployeeF
    Company4
    EmployeeG
    EmployeeH
    EmployeeI
    Company5
    EmployeeJ
    EmployeeK
    EmployeeL


    Should I use a Report, a Form?

    Thanks
    Martins
     
    H. Martins, Apr 9, 2013
    #1
    1. Advertisements

  2. Depends what you want to do with it. If you want to print it, you should use
    a report. If you want the user to interact with it, you should use a form.

    If you're using a form, be aware that queries that join 3 tables often are
    not updatable.

    If you're using a report, remember that Access does not respect the sort
    order applied to the query: you must use the Grouping and Sorting dialog for
    the report.

    "H. Martins" wrote in message
    news:...

    Hi.

    I need some hint (Access 2003).

    Simplifying, I have a database that has a table for cities, a table for
    companies and, as expected, a table for employees.

    Tables are related as: cities has companies, companies have employes.

    How do I do a list of cities / companies / employees as:

    CityX
    Company1
    EmployeeA
    EmployeeB
    Company2
    EmployeeC
    EmployeeD
    EmployeeE
    CityY
    Company3
    EmployeeF
    Company4
    EmployeeG
    EmployeeH
    EmployeeI
    Company5
    EmployeeJ
    EmployeeK
    EmployeeL


    Should I use a Report, a Form?

    Thanks
    Martins
     
    Douglas J Steele, Apr 9, 2013
    #2
    1. Advertisements

  3. H. Martins

    H. Martins Guest

    Hi Douglas,

    Thank you.

    But, how do I do this triple record listing the way as the example shows?
     
    H. Martins, Apr 10, 2013
    #3
  4. In a report, you'd Group on City and then on Company and you'd sort on
    Employee.

    Add GroupHeaders for the two groups you created: put the City in the first
    group header and the company in the second one.

    "H. Martins" wrote in message
    news:...

    Hi Douglas,

    Thank you.

    But, how do I do this triple record listing the way as the example shows?
     
    Douglas J Steele, Apr 10, 2013
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.