Results 1 to 8 of 8
  1. #1
    rwahdan1978 is offline Advanced Beginner
    Windows 11 Access 2016
    Join Date
    Jun 2024
    Posts
    57

    getting sums in report

    Hi

    I have the below report that has payment field. the paymnet can vary between 100 and 500 and it is shown in the report above the first bound textbox below.

    Click image for larger version. 

Name:	Screenshot 2024-08-25 190948.jpg 
Views:	29 
Size:	92.9 KB 
ID:	52151

    the first textbox bound should get the remainder of (500 - the number above taken from table). example if the number is 200 then it is 500-200 then the textbox value should be 300. and the bottom of the report (the second bound textbox), should have the total of the remainders of all records.

    How to do that? I am trying to do that in a query but I am not sure how to do math in queries.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Would that be the number of customers X 500 - sum of payment1 ?

    First UNBOUND textbox: =500 - [Payment1]

    Second UNBOUND textbox: =Count(*) * 500 - Sum([Payment1])

    Will customer be unique in Detail section - each customer has only one record?
    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
    rwahdan1978 is offline Advanced Beginner
    Windows 11 Access 2016
    Join Date
    Jun 2024
    Posts
    57
    I tried this in the report footer
    Code:
    textbox1=([Text12].[Value]*500)
    textbox2=Sum([Payment1])
    so i am getting as an example

    5300
    3400

    now how to get the difference of them in third textbox. I tried I am getting all 3 textboxs as erros.

  4. #4
    ano is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Nov 2023
    Posts
    204
    ofcourse each customers should have multiple records else the setup is useless
    so count need only groups unless the report have done the sum already but then the field is useless

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Multiple customer records unless report filter results in one per customer.

    Possibly need to base report on an aggregate query that summarizes customer payments.

    Could provide db for analysis. Follow instructions at bottom of my post.
    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
    ano is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Nov 2023
    Posts
    204
    1st ur code make no sense comparing ur text ; text say - code tell *
    2nd if payment is summarized already why u need difference?
    3rd nice u get errors and want help on all errors availble in report the error would make sense for us perhaps
    seems u forget to upload ur database for analyze and understand ur problem

  7. #7
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,157
    @Ano - I wish you would not use "text speak" in your answers.
    A lot of posters here don't use English as their first language (I'm not sure if it's you native language), and a longer better constructed reply from you might make more sense to them.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  8. #8
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Ditto. Have to wonder if it's an 'English is not the primary language' thing, or if it's a 'millennial who's too lazy to type full words and sentences'.
    If it's about English then may I suggest anyone in that category type their post in Google translate and paste that. It will be better than what we're reading.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Making a report that sums specific bale types
    By Zetheroth in forum Access
    Replies: 1
    Last Post: 11-18-2022, 03:25 AM
  2. Replies: 4
    Last Post: 12-29-2016, 03:07 PM
  3. Query/Report with x/y axis and sums
    By robbeh in forum Queries
    Replies: 1
    Last Post: 03-23-2016, 11:41 AM
  4. Replies: 3
    Last Post: 11-26-2012, 01:24 PM
  5. Sums in Detail area of report
    By Rick West in forum Reports
    Replies: 2
    Last Post: 12-01-2009, 07:15 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