473,320 Members | 2,202 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

DSum reference in a report

Hi:

At the bottom of a report, I wish to sum all the amounts that appear in a field called
Discount$ that appears on the report. I am not doing this summing in the query that
supports the report because I have sprinkled the discounts amount into every record, and
it only applies in the totals summary for each invoice.

In any case, the Field is called Discount$ and the report is called RINV1Q1. How do I
reference the field in the report (Group summry for the Invoices over a period) so that I
sum ONLY those entries that appear n the report.

The following is my attempt, and all I get is errors!
=DSum([Discount$],[Reports]![RINV1Q1])

Help Please
John Baker
Nov 12 '05 #1
4 2636
I just realized I hadn't posted a critical piece of information:

The field Discount $ is in a section of the report RINV1Q1 named "PO Key Footer". I think
my problem is I am not certain how to refer to a filed in a FOOTER rather than in the main
report.

best and thanks in advance

John baker

John Baker <Ba******@Verizon.net> wrote:
Hi:

At the bottom of a report, I wish to sum all the amounts that appear in a field called
Discount$ that appears on the report. I am not doing this summing in the query that
supports the report because I have sprinkled the discounts amount into every record, and
it only applies in the totals summary for each invoice.

In any case, the Field is called Discount$ and the report is called RINV1Q1. How do I
reference the field in the report (Group summry for the Invoices over a period) so that I
sum ONLY those entries that appear n the report.

The following is my attempt, and all I get is errors!
=DSum([Discount$],[Reports]![RINV1Q1])

Help Please
John Baker


Nov 12 '05 #2
John Baker wrote:
Hi:

At the bottom of a report, I wish to sum all the amounts that appear in a field called
Discount$ that appears on the report. I am not doing this summing in the query that
supports the report because I have sprinkled the discounts amount into every record, and
it only applies in the totals summary for each invoice.

In any case, the Field is called Discount$ and the report is called RINV1Q1. How do I
reference the field in the report (Group summry for the Invoices over a period) so that I
sum ONLY those entries that appear n the report.

The following is my attempt, and all I get is errors!
=DSum([Discount$],[Reports]![RINV1Q1])

Help Please
John Baker


Where are you putting this sum?

If on the report itself you only need:
=Sum([Discount$])

Note it's Sum() and not DSum()

If it's something external to the report then DSum() will need to know
the report's recordsource and any criteria if any that was applied to
the report upon opening it but the simnplest way woulkd be to do the
above Sum() on the report, name that textbox whatever "txtSum" then you
can reference it like =Reports!RINV1Q1!txtSum

--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Nov 12 '05 #3
Trevor:

When i use =sum([Discount$]) it selects all the entries from the query that supports the
report. This isn't what I need. I need to ONLY pick up the entries that appear in the
"Invoice FOOTER" for the report so that I can sum all the discount lines take over a
period. This is where I am hung up.

Sorry if I didn't make myself clear.

Best

John

Trevor Best <nospam@localhost> wrote:
John Baker wrote:
Hi:

At the bottom of a report, I wish to sum all the amounts that appear in a field called
Discount$ that appears on the report. I am not doing this summing in the query that
supports the report because I have sprinkled the discounts amount into every record, and
it only applies in the totals summary for each invoice.

In any case, the Field is called Discount$ and the report is called RINV1Q1. How do I
reference the field in the report (Group summry for the Invoices over a period) so that I
sum ONLY those entries that appear n the report.

The following is my attempt, and all I get is errors!
=DSum([Discount$],[Reports]![RINV1Q1])

Help Please
John Baker


Where are you putting this sum?

If on the report itself you only need:
=Sum([Discount$])

Note it's Sum() and not DSum()

If it's something external to the report then DSum() will need to know
the report's recordsource and any criteria if any that was applied to
the report upon opening it but the simnplest way woulkd be to do the
above Sum() on the report, name that textbox whatever "txtSum" then you
can reference it like =Reports!RINV1Q1!txtSum


Nov 12 '05 #4
John Baker wrote:
I just realized I hadn't posted a critical piece of information:

The field Discount $ is in a section of the report RINV1Q1 named "PO Key Footer". I think
my problem is I am not certain how to refer to a filed in a FOOTER rather than in the main
report.

best and thanks in advance

You'd need some code to do that as no syntax in a control will do it.

--- code start (air code) ---

(declarations)
Private mcurDiscountTot As Currency

Sub PO_Key_Footer_Print()
mcurDiscountTot = mcurDiscountTot + Me![Discount$]
End Sub

Sub Report_Footer()
Me!MyGrantTotal = mcurDiscountTot
End Sub
--- code end ---

The two subs would be event procedures, the names and parameters may be
slightly different from above.

--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rolan | last post by:
I'm using Access 97 and need some assistance in sorting out a proper DSum expression, or maybe even DCount might be an alternative. I have tried numerous combinations, but with no apparent success....
3
by: Mark Reed | last post by:
All, I have never used this function before and am not sure it what I need. Just to clarify, I have a report based on a query which has amoungst other field, wk, parea & packs_req. What I am...
4
by: stephena | last post by:
Hello all, hope someone can help. I recently built a report showing the distribution of money in and out of the company. Simplified version of which looks like: DECEMBER 2004 TELEPHONE...
6
by: pixie | last post by:
Hi. I'm having problems with the following DSum in my report footer. It gives me #Error when I run the report. I hope someone can help me out as I am at my wits end. What I am trying to do is to...
6
by: ckpoll2 | last post by:
Hi, I have made a report that has a query as its record source. I put a text box in there that I want to run a dsum function off of a different query. The criteria that I need to use is that it...
1
by: danielgoss | last post by:
Hi I have a report that has loads of textboxes that calculate things based on the value on another textbox in the report. I have put a hidden textbox on my report that gets its value from an...
9
by: BlackJack17 | last post by:
Alright you all have been so helpful with everything else that I thought I'd run one more issue by you. I have put together a report that is driven by a query. This query (Unique Records) returns...
13
by: ringer | last post by:
Hi, I have a text box on report where I need to have dsum return a total. The records I need the total from are not in the table that is the report's recordsource, and to complicate things...
4
by: Adam1331 | last post by:
I've been trying to get the DSum function to work but I've been running into some roadblocks. What I'm trying to do is to total up times in a timesheet report into different departments. The report...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.