By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,700 Members | 1,451 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,700 IT Pros & Developers. It's quick & easy.

Sum of 2 Text Boxes

100+
P: 132
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("*","EMHS New Closed Appeals Preview")
Feb 27 '08 #1
Share this Question
Share on Google+
7 Replies


P: 4
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("*","EMHS New Closed Appeals Preview")

try this...

=sum(Count([Case]) ,DCount("*","EMHS New Closed Appeals Preview")
Feb 28 '08 #2

NeoPa
Expert Mod 15k+
P: 31,769
You don't share much info, but in TextBoxC you could have :
Expand|Select|Wrap|Line Numbers
  1. =[TextBoxA] + [TextBoxB]
Feb 28 '08 #3

100+
P: 132
You don't share much info, but in TextBoxC you could have :
Expand|Select|Wrap|Line Numbers
  1. =[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("*","EMHS 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???
Mar 3 '08 #4

JKing
Expert 100+
P: 1,206
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("*","EMHS 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.
Mar 3 '08 #5

JKing
Expert 100+
P: 1,206
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?
Mar 3 '08 #6

100+
P: 132
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.
Mar 3 '08 #7

NeoPa
Expert Mod 15k+
P: 31,769
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("*","EMHS 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?
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.
Mar 3 '08 #8

Post your reply

Sign in to post your reply or Sign up for a free account.