Results 1 to 2 of 2
  1. #1
    mrslaurabelle is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Posts
    2

    Custom Grouping if field contains value

    I have a situation where I want the report to group at a state level. The problem is each record could involve multiple states. So, the record could appear on the report multiple times, but only once for each state. For example, a record 123abc with KS/CA/KS/KS/KS/ID should appear in the group for KS, CA, and ID. Also, any states without a record should not appear (the least of my concerns right now).
    Given 123abc - KS/CA/KS/KS/KS/ID and 789xyz - CA/NY/CA/CA/CA/NY, I envision the report looking like:
    CA
    123abc
    789xyz
    ID
    123abc


    KS
    123abc
    NY
    789xyz

    Perhaps this starts at the query, but I'm not quite sure where to go with this or if it's even possible. If additional information is needed, please let me know.

    Thanks,
    Laura

  2. #2
    mrslaurabelle is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Posts
    2
    Well, I solved it. Of course, as soon as I post this I have a revelation. I have a table with the states already. I created a new query containing the state abbreviation field from the states table. Then created the field: include: [OutputQuery]![AllState] Like ("*" & [States]![StateAbb] & "*"), Criteria -1 (ie true) and included all of the fields from the query I was originally trying to use.

    Leaving this up in case it is useful for anyone else.

    Happy querying!

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

Similar Threads

  1. Replies: 1
    Last Post: 04-16-2013, 09:51 PM
  2. Custom ID field issue
    By ToolJob in forum Queries
    Replies: 5
    Last Post: 04-12-2013, 09:48 AM
  3. Grouping by a specific field.
    By Boss_Tally in forum Queries
    Replies: 1
    Last Post: 01-13-2013, 01:25 PM
  4. Replies: 3
    Last Post: 07-31-2012, 06:05 AM
  5. Custom Query field
    By yeleek in forum Queries
    Replies: 3
    Last Post: 06-07-2012, 07:58 AM

Tags for this Thread

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