Results 1 to 9 of 9
  1. #1
    zmbaker is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    31

    Complex Report with similar fields


    I currently have 5 querys to create a report that is housed in excel. I open the query and copy and paste the data into excel for each of the 5. The reason being is that several of the fields are the same but the difference is the criteria in each query is different. Is it possible to make a report that uses several of the same fields but each having different criteria?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Two options come to mind: using subreports for each of the 5 queries and using a UNION query to pull all 5 into 1.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What are the different criteria? Why report in Excel? I wonder if Access report Sorting & Grouping feature could accomplish what you are doing with 5 queries.
    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.

  4. #4
    zmbaker is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    31
    The Union Query solved about 98% of what I am trying to accomplish. The final missing part is that one of the queries contained a sum function on the datasheet. Is it possible in a report to only use certain cells from a query? Or alter the first query to provide the same results by using a sum function in the design view.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What do you mean by 'certain cells' - only certain records?

    Certainly report can do summary calcs.
    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.

  6. #6
    zmbaker is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    31
    This is the result of my Union query.

    Click image for larger version. 

Name:	Capture.PNG 
Views:	10 
Size:	22.6 KB 
ID:	17248
    The bottoms 4 lines are accurate and are what I am looking for. However the top 18 need to be combined some how in the following. The first column needs to count them to total 18, the second column needs to sum them to equal $473565.96

    I cant provide a database of this for confidentiallity purposes.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Back to my question in post 3.

    An expression in footer section can be like:
    Count(IIf(TVCNo LIKE "UNKNOWN*", SumOfEstDeviceServiceAnnualAmount))
    Sum(IIf(TVCNo LIKE "UNKNOWN*", SumOfEstDeviceServiceAnnualAmount,Null))

    What is the confidentiality issue? Can you make copy and delete confidential data (name, ssn, phone, email)?

    Or post a sample of raw data.
    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
    zmbaker is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    31
    If I could pick certain records yes. I tried both of the above formulas and neither of them work, they both produce a #error

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Maybe put both fieldnames in [], although Access should do that for you.

    All I can say is that the expressions have been successful for others. Without knowing your data, can't really be more specific.
    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.

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

Similar Threads

  1. Replies: 7
    Last Post: 06-19-2014, 12:00 PM
  2. return data for similar fields
    By kwooten in forum Queries
    Replies: 5
    Last Post: 08-06-2013, 02:18 PM
  3. How to Join Similar Fields Based on a Third Field?
    By Inaccessable in forum Queries
    Replies: 1
    Last Post: 07-12-2013, 03:56 PM
  4. Relating similar fields???
    By smoothlarryhughes in forum Access
    Replies: 10
    Last Post: 02-26-2013, 12:50 PM
  5. Replies: 2
    Last Post: 05-29-2012, 07:13 PM

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