Results 1 to 6 of 6
  1. #1
    axg275 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    19

    Simple But Complecated Problem Reports and Subtotals

    Hi All,



    I have been having a problem putting together a report. I have two tables. Table A that has unique entries for the same "Field". Table A has 170 rows. Table B that has that same "Field" but its a smaller table with 32 rows. I created a report base off query that joints Table A and Table B. When I join ofcorse table B entries are repeated for the same "Field". In the report "Detailed" section I add columns from the query from what used to be Table A. In the Subtotal I want to use what was in Table B. But it does not work since the numbers are repeated. I dont know what to do. I tried the DLookup and DSum. I thought maybe doing some sort of query. DLookup does not seem to work. I may not have correct syntax, iv tried several different ways and cant get it to work.

    I am attaching the database. I am trying to get NGVU_Eng Footer to sum up entries. Take a look at the text box "Text101". I am trying to pull in data from qry_OilTable Column "Prob_01 Risked Oil Recovery (Mbbl)" summed up to NGVU level. which is a column in this same query called "NGVU_Eng".

    Maybe someone has ran into this problem before and can give me a hand on solving this problem.

    Thank you in advance for any help you can provide.


    Alex
    Attached Files Attached Files

  2. #2
    jojowhite's Avatar
    jojowhite is offline Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    434
    you forgot to attach the 2 workbooks.

  3. #3
    axg275 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    19
    Hi sorry, i am attaching the same file. I changed the linked tables to local tables.
    Attached Files Attached Files

  4. #4
    jojowhite's Avatar
    jojowhite is offline Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    434
    there is a problem on attaching any zip file here (get corrupted when downloaded),
    you can check in Design view of report the Control source of "text101".

    you need to download the db from my Onedrive.
    https://1drv.ms/u/c/c5af92cc292c1bb3...c-MTg?e=2dGbge

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    zip files appear to work now arnel.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Also, be aware that First and Last aggregate functions might not return what you expect. Possibly you should use Min instead of First.
    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: 3
    Last Post: 07-18-2022, 09:23 AM
  2. Replies: 5
    Last Post: 01-14-2018, 02:29 PM
  3. Replies: 2
    Last Post: 11-10-2017, 07:52 PM
  4. Subtotals in Reports
    By School Boy Error in forum Reports
    Replies: 3
    Last Post: 10-24-2013, 12:07 PM
  5. Subtotals in reports are calculating incorrectly.
    By Long Tom Coffin in forum Reports
    Replies: 3
    Last Post: 07-24-2012, 10:41 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