Results 1 to 5 of 5
  1. #1
    IamKJVonly is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    Aug 2018
    Posts
    40

    How do I build a query that that list all the states but will show each state only once?

    I know this has to be something simple but I can't figure out how to do it.


    I can build a query that list all the states in my state field in my table but I wind up wiith 50 New Yorks or 30 Floridas and etc.

    I want the query to show each state only once. No duplicates.

    I know it has to be something simple but my searches give me too many posts to go through or not enough post.
    I hate to post this question but thanks foe any help you can give me.
    Dave

  2. #2
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,142
    Read up on SELECT DISTINCT

  3. #3
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You can also do it using an Aggregate Query, grouping on the State Name.

  4. #4
    IamKJVonly is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    Aug 2018
    Posts
    40
    Well it took me over 2 hours to figure I needed to mark the property "Unique value" to yes to get what I wanted.
    Thanks for forcing me to look in
    Aggregate Query and grouping on the State Name and
    SELECT DISTINCT.
    While trying to figure these things out I stumbled across the
    "Unique value" property. page 277 in Access 2010 for dummies.

    Probably if I had worded the question better you would have been able to give me the answer right off. Sorry about that.

    Now my next problem How do I mark this thread solved?
    Dave



  5. #5
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    For an Aggregate Query, all you would need to do:
    - Create a new query
    - Add the table where this State field resides
    - Add the State field to the query
    - Click on the Totals button (looks like a Sigma)
    - View your results

    That's it!

    As for marking the thread as solved, see here: https://www.accessforums.net/showthread.php?t=1828

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

Similar Threads

  1. Query to check state of multiple chckboxes
    By Bobbingbob in forum Queries
    Replies: 8
    Last Post: 06-04-2015, 10:23 PM
  2. Replies: 15
    Last Post: 06-19-2014, 02:14 PM
  3. build compatibility list
    By jdlevaccess in forum Access
    Replies: 11
    Last Post: 09-21-2012, 08:41 PM
  4. Replies: 7
    Last Post: 08-15-2011, 05:35 AM
  5. States Table & PK
    By mastromb in forum Database Design
    Replies: 8
    Last Post: 01-01-2010, 11:25 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