Results 1 to 8 of 8
  1. #1
    crimedog is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    141

    Adding the values from 3 Text Boxes

    I have [TxtMo1] [TxtMo2] [TxtMo3] in the Details section of my report - They are unbound with a Row Source that uses Dlookup - the text Boxes are formatted as Currency [TxtMo1] [TxtMo2] [TxtMo3] all display the correct amount (in this case $25,000
    In the <edit> Report <edit>Footer have An unbound Text Box formatted as Currency. In the control source I have =[TxtMo1]+[TxtMo2]+[TxtMo3] it should = $75,000

    I get error #Type

    It feels like this should be simple. Any help would be appreciated



    ** I had it in the page footer - but moved it to Report Footer = same problem

  2. #2
    crimedog is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    141
    never mind moving it from Page footer to report footer fixed it. I have another issue - I will start a new thread

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Do you mean ControlSource instead of RowSource?

    Calcs in header/footer section are normally to aggregate data (Sum, Avg).

    Aggregate calcs cannot reference controls, they must reference fields from the RecordSource.

    Can just do the addition calc in the Detail section.
    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.

  4. #4
    crimedog is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    141
    Ok - the printed version shows the amount I want (so I thought it was fixed) but the Report view still shows #Type
    I am getting an error when I try to sum the fields from a Query (also in the Footer) Sum([Qry1]![Revenue]) = #Error

  5. #5
    crimedog is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    141
    moved it into details and the Additions are working right - but the Sum([Qry1]![Revenue]) is still showing Error

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Revenue is a field in the report RecordSource?

    Probably don't need the [Qry1] prefix.
    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.

  7. #7
    crimedog is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    141
    The Main report does not have a recordsource - the subreports each have a recordsource : Qry1 Qry2 Qry 3
    If I total on the subreport - and there are no records it won't show. So I put the textbox into the report details

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Why subreports - what is the data in each?

    If you need to reference subreport textbox from main form, set the subreport container name different from the object it holds, like: ctrQ1

    Then try:

    =Nz([ctrQ1].Form.textboxname,0) + Nz([ctrQ2].Form.textboxname,0) + Nz([ctrQ3].Form.textboxname,0)
    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: 8
    Last Post: 11-21-2014, 04:39 PM
  2. Replies: 1
    Last Post: 05-30-2014, 02:25 PM
  3. Replies: 5
    Last Post: 04-01-2013, 11:49 AM
  4. Replies: 3
    Last Post: 11-24-2012, 05:35 PM
  5. Replies: 10
    Last Post: 08-01-2009, 06:48 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