Another DSum question

Posted on 2011-04-21
Last Modified: 2013-11-05
Can someone tell me what is wrong with this code?  Am using it in an unbouse field on a report.

=DSum([Cost],"tblOutpurchase","[EstN] = frmEstimateHeader!txtRealEstN")
Question by:SteveL13
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    Maybe this - if EstN is Text ?

    =DSum([Cost],"tblOutpurchase","[EstN] = " & Chr(34) & Forms!frmEstimateHeader!txtRealEstN & Chr(34))


    Author Comment

    Hmmm, I get a "Enter parameter value --  Cost" when I try to run the report.  I know Cost is the field in the table tblOutpurchase.  

    Author Comment

    And EstN is a text field.
    LVL 75

    Accepted Solution

    oops - need double quotes

    =DSum("[Cost]","tblOutpurchase","[EstN] = " & Chr(34) & Forms!frmEstimateHeader!txtRealEstN & Chr(34))

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    This article is a continuation or rather an extension from Cascading Combos ( and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
    When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now