Results 1 to 15 of 15
  1. #1
    SpaceEd is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    17

    Hide Duplicates selectively

    Hi

    I'm trying to make a report that hides duplicates. I have several categories such as "Function," "Responsibility" and "Action." They have something similar to a one-to-many relationship in that there are several Actions for each Responsibility, and several Responsibilities to each Function.

    The problem is the same values disappear although they may be in different groups. It is the exact problem discussed here:

    http://allenbrowne.com/casu-21.html

    I tried this solution, but it doesn't seem to work for Access 2010. When I try entering the solution, Access can't seem to refer to itself from the Control Source code. Would anyone know the solution for the Access 2010 version?

    Any help would be really appreciated.


    Thank you!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    I just tested this with Access2010. Only works properly when the report is run in PrintPreview or sent to printer. This is a recurring situation with reports. Some things only work in PrintPreview.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    SpaceEd is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    17
    Thanks for your response.

    I understand it only works for print preview, but what I mean is it will still hide the duplicates even for different groups. For example, if I have

    Function 1...Responsibility A
    Function 1...Responsibility B
    Function 2...Responsibility B
    Function 2...Responsibility C

    Responsibility B for Function 2 is still hidden even though I don't want it to be hidden.

    It's the problem described in the link above.

    Thanks again. Your help would be appreciated.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    I tested and cannot replicate the issue. Do you want to provide project for analysis?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    SpaceEd is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    17
    Essentially what I would like it to do would be to blank Action out only if both Function and Responsibility are duplicates, and Action is a duplicate. However, the same action could appear in two different functions.

    Function 1...Resp A...Action A
    .............................Action B
    .............................Action C
    .................Resp B...Action A
    .............................Action D
    Function 2...Resp A...Action E
    .............................Action F
    .................Resp D...Action F
    .................Resp E...Action A
    .............................Action G


    Is there an expression to do something like
    Iif(ISDUPLICATE?([Function]),Iif(ISDUPLICATE?([Resp]),null,[Resp]),[Function])

  6. #6
    SpaceEd is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    17
    Sure I can send it via email if you want

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    Make copy, remove confidential data, run Compact & Repair, zip if still large, attach to post. The Attachment Manager is below the Advanced post editor.

    I think you should use report Grouping & Sorting to accomplish what you want. Have a group for Function and a group for Responsibility. Action could be detail.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    SpaceEd is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    17
    If you go to "Search" then click the line that has "15" and then click the "Go to Form" button. The form shows the data it should have. Then if you click the "View Report" button, you may see what I'm talking about. In the third and fourth columns, it is missing data it shouldn't be.

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    Your data does not fit either the Allen Browne solution or the Hide Duplicates. You will have to work with data in report Group headers and the stair-step effect of display. Anything else would probably involve elaborate code and temp table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  10. #10
    SpaceEd is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    17
    Ok is there an sql statement or vba code that checks iif(THIS FIELD IS DUPLICATE, Hide Field, Enter this value) type function?

    Thanks for your help again and taking the time to look. I appreciate it.

  11. #11
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    No function.

    As I said, anything else would probably require elaborate VBA code and a temp table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  12. #12
    SpaceEd is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    17
    Hmm... ok the only problem with the stepped display is because there are so many categories, one line of info could take a whole page. I've played around with iif...isnull...dlookups... but unfortunately that slows it down.

    Ok thanks.

  13. #13
    SpaceEd is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    17
    Hi June7,

    I've been reading up on Temp tables, but would you be able to point me in the right direction as to begin getting this done? I'm not quite sure where to start? Can you think of what type of functions I might need.

  14. #14
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    This thread has example of one of my uses of a temp table http://forums.aspfree.com/microsoft-...ry-322123.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #15
    SpaceEd is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    17
    I created a pretty elaborate vba code with the associated form, and then linked it to the expression in the report. It worked somewhat but it turned out to be really complex and gimmicky upon updating.

    Can you or anyone think of another simpler solution? Is there anything I can fix with the groupings? What is with the Hide Duplicates property that still hides the field when it is in a different grouping?

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

Similar Threads

  1. keep getting duplicates
    By MichaelMic in forum Queries
    Replies: 3
    Last Post: 05-15-2011, 10:37 PM
  2. Hide Duplicates
    By cassidym in forum Reports
    Replies: 2
    Last Post: 03-01-2011, 10:45 AM
  3. Using data in the import to selectively insert
    By mrbaggins in forum Import/Export Data
    Replies: 4
    Last Post: 11-25-2010, 06:08 PM
  4. Hide Duplicates In Look Up Form
    By PonderingAccess in forum Queries
    Replies: 2
    Last Post: 09-30-2010, 12:23 PM
  5. Hide Duplicates with Group Headers
    By diwin in forum Reports
    Replies: 0
    Last Post: 03-26-2009, 09:32 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