Results 1 to 5 of 5

Thread: [RESOLVED] Can you use Sumif for a CalculatedControl in an Access Report?

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2006
    Location
    Anchorage, Alaska
    Posts
    545

    Resolved [RESOLVED] Can you use Sumif for a CalculatedControl in an Access Report?

    I have a report that has groups. Above the groups, in the report header, I want to show a summary of the total Debits, and total Credits, broken down per industry, Internet, Cable etc.

    The report currently shows

    RCS
    --Supervisor
    ----Employee
    ------Debit, Credit, Type.

    if I put a control at the top of the report, and say =sum(Credit) it will give me a sum of credit for everything, I need it to break down by Type.

    Debit -- Credit -- Type
    $50 -- $100 -- Internet
    $30 -- $50 -- Cable

    Will SumIf work on a report? I don't see if in the access help section, but it seems like it would do the trick.

    EDIT1:

    Just found the Dsum again.
    Tried this, but it keeps asking me for a value for the report?

    =DSum([Credit],[Report].[rptCS3Detail],"adjReasonCode='DNU'")

    rptCS3Detail, is the report, where the textbox is

    Edit2:

    Tried a few other ways, but get #Error

    =DSum("Credit","rptCS3Detail.RecordSource","rptCS3Detail.Filter")
    Was hoping, this would use the report data, and the report filter.
    Also tried
    =DSum("Credit","qryCS3Detail","rptCS3Detail.Filter")


    Edit3:

    Well, I found "a" way to do it. But it's not very dynamic, and it's a very patchy/bugy kind of way.

    I created a textbox on the form that you pick data from.
    I save the Where clause that I send to the report, in that textbox.
    I also have to type in, each Item in the tblAdjReasonCode
    =DSum("Credit","qryCS3Detail",Forms!frmKCreditDebit!txtGStrWhere & " adjReasonCode='Courtesy Credit - Internet'")

    So I guess, now my question is, how can I do this better, easier, dynamic, and cookie cutter?
    Last edited by rack; Feb 8th, 2008 at 07:26 PM.
    Please RATE posts, click the RATE button to the left under the Users Name.

    Once your thread has been answered, Please use the Thread Tools and select RESOLVED so everyone knows your question has been answered.


    "As I look past the light, I see the world I wished tonight, never the less, sleep has come, and death shall soon follow..." © 1998 Jeremy J Swartwood

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width