Results 1 to 5 of 5
  1. #1
    nacho is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2010
    Posts
    11

    Creating Relationships and Queries

    Hello everyone,
    First thread (Please tell me if you'd like Screenshots)

    Edit: Problem solved, just changed the data-type so they both matched

    New problem: I want to create queries showing a specific field and the field has many common values amongst the table
    For example: The field has the entry "Nike shoes" 5 times "Adidas shoes" 3 times "Brookes" shoes 7 times.


    I want to be able to sort these from the most common appearance to the lowest, so in descending order eg:
    Brookes Shoes
    Nike Shoes
    Adidas Shoes
    ______
    I understand that there is a "Sort" option, however this only puts them in alphabetical order.
    Thanks
    Last edited by nacho; 04-15-2010 at 05:38 AM.

  2. #2
    ConneXionLost's Avatar
    ConneXionLost is offline Simulacrum
    Windows XP Access 2003
    Join Date
    Jan 2010
    Location
    Victoria, Canada
    Posts
    291
    If you're absolutely certain that:

    Quote Originally Posted by nacho View Post
    The customer's each have one salesman, ...
    then, you should join your tables between "Customer's Salesman" in the CustomerDetails table, with EmployeeID in the SalesmanDetails table.

    You may need to convert "Customer's Salesman" to the same type as "EmployeeID".

    Cheers,

  3. #3
    nacho is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2010
    Posts
    11
    thanks conne
    Last edited by nacho; 04-15-2010 at 05:38 AM.

  4. #4
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    I dont know if your Edit was saying your "new problem" was solved, but in case its not...

    SELECT myTable.ShoeName, Count(myTable.ShoeName) AS Count
    FROM myTable
    GROUP BY myTable.ShoeName
    ORDER BY Count(myTable.ShoeName) DESC;

    If you dont want to see the count, remove "Count(myTable.ShoeName) AS Count"

    If that solved your issue, please mark thread "solved"

  5. #5
    nacho is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2010
    Posts
    11
    i finally figured it out, thanks anyways,
    Last edited by nacho; 04-16-2010 at 05:38 AM.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Table Relationships?
    By Meld51 in forum Access
    Replies: 3
    Last Post: 03-01-2010, 08:34 AM
  2. question about relationships
    By grad2009 in forum Access
    Replies: 3
    Last Post: 02-16-2010, 06:12 PM
  3. Creating input forms for queries?
    By Brujeria5 in forum Queries
    Replies: 1
    Last Post: 08-14-2009, 08:48 AM
  4. Table Relationships
    By jp2access in forum Database Design
    Replies: 3
    Last Post: 06-19-2009, 10:20 AM
  5. I need help on relationships for tables.
    By justin.w in forum Access
    Replies: 0
    Last Post: 10-16-2006, 10:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums