Sum of 2 Text Boxes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Proaccesspro
    New Member
    • Apr 2007
    • 132

    Sum of 2 Text Boxes

    I have to text boxes that have a different control source. Can I ADD the values of each text box?? I'm guessing the code to be something like:

    =sum(Count([Case]) & DCount("*","EMH S New Closed Appeals Preview")
  • talllight
    New Member
    • Feb 2008
    • 4

    #2
    Originally posted by Proaccesspro
    I have to text boxes that have a different control source. Can I ADD the values of each text box?? I'm guessing the code to be something like:

    =sum(Count([Case]) & DCount("*","EMH S New Closed Appeals Preview")

    try this...

    =sum(Count([Case]) ,DCount("*","EM HS New Closed Appeals Preview")

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32661

      #3
      You don't share much info, but in TextBoxC you could have :
      Code:
      =[TextBoxA] + [TextBoxB]

      Comment

      • Proaccesspro
        New Member
        • Apr 2007
        • 132

        #4
        Originally posted by NeoPa
        You don't share much info, but in TextBoxC you could have :
        Code:
        =[TextBoxA] + [TextBoxB]
        I tried that intially, but no cigar......I have 2 text boxes in a report that I need to sum. The first text box has a control source of =Count([Case]), the second has a control source of =DCount("*","EM HS New Closed Appeals Preview")
        When I use [txtbox3] =[txtbox1] + [txtbox2], NO Value appears on the report.....

        Another issue I have is how can I store the value of textbox3 for future use ??

        Lastly, I have yet another text box that is tied to a select query. When run, the query would return a count BY item. For example

        Letters in Review 2
        Phone Calle Made 4
        Legal Review 6

        I am trying to stuff the ENTIRE result of the query into a text box. When I run the report, it asks me for a parameter value. I'm guessing the parameter value it is looking for is the type of item, i.e.Phone Call, or Legal Review, etc...Is there another whay to do this?? Also, would the text box grow and shrink with the number of rows the query returns???

        Comment

        • JKing
          Recognized Expert Top Contributor
          • Jun 2007
          • 1206

          #5
          Originally posted by Proaccesspro
          I tried that intially, but no cigar......I have 2 text boxes in a report that I need to sum. The first text box has a control source of =Count([Case]), the second has a control source of =DCount("*","EM HS New Closed Appeals Preview")
          When I use [txtbox3] =[txtbox1] + [txtbox2], NO Value appears on the report.....

          Another issue I have is how can I store the value of textbox3 for future use ??
          What is your report based off of?

          I'm hoping and assuming it's based off a query. If this is the case why not just sum the two fields in the query? Then you will have a brand new field that you can place on your report with the correct value. This will also allow you to retrieve the value for future use i.e. other reports or forms.

          Comment

          • JKing
            Recognized Expert Top Contributor
            • Jun 2007
            • 1206

            #6
            Originally posted by Proaccesspro
            Lastly, I have yet another text box that is tied to a select query. When run, the query would return a count BY item. For example

            Letters in Review 2
            Phone Calle Made 4
            Legal Review 6

            I am trying to stuff the ENTIRE result of the query into a text box. When I run the report, it asks me for a parameter value. I'm guessing the parameter value it is looking for is the type of item, i.e.Phone Call, or Legal Review, etc...Is there another whay to do this?? Also, would the text box grow and shrink with the number of rows the query returns???
            Instead of cramming all that info into a textbox, why not use a subreport?

            Comment

            • Proaccesspro
              New Member
              • Apr 2007
              • 132

              #7
              Originally posted by JKing
              Instead of cramming all that info into a textbox, why not use a subreport?

              Yes, the text boxes are based off queries....Not sure that would solve my problem because I still need to sum the values of seperate textboxes stemming from multiple querues.

              Comment

              • NeoPa
                Recognized Expert Moderator MVP
                • Oct 2006
                • 32661

                #8
                Originally posted by Proaccesspro
                I tried that intially, but no cigar......I have 2 text boxes in a report that I need to sum. The first text box has a control source of =Count([Case]), the second has a control source of =DCount("*","EM HS New Closed Appeals Preview")
                When I use [txtbox3] =[txtbox1] + [txtbox2], NO Value appears on the report.....
                Where are the text boxes included in your report?
                Are they in the same section? Are any in headers or footers?
                Originally posted by Proaccesspro
                Another issue I have is how can I store the value of textbox3 for future use ??

                Lastly, I have yet another text box that is tied to a select query. When run, the query would return a count BY item. For example

                Letters in Review 2
                Phone Calle Made 4
                Legal Review 6

                I am trying to stuff the ENTIRE result of the query into a text box. When I run the report, it asks me for a parameter value. I'm guessing the parameter value it is looking for is the type of item, i.e.Phone Call, or Legal Review, etc...Is there another whay to do this?? Also, would the text box grow and shrink with the number of rows the query returns???
                Please post these in another thread.
                Separate issues - separate threads.

                Admin.

                Comment

                Working...