|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am working on a form with a calculated field and I want to add two string values on the form together.
The two text boxes are unbound and the values are determined by a case select based on the choice of a combo box. To get a total of the two unbound text boxes I tried adding them together in the third unbound text box but it is just concatenating the to boxes together. IE: unboundtextbox1 = 30.00, unboundtextbox2 = 15.00, unboundtextbox3 = [unboundtextbox1]+[unboundtextbox2]. The answer shoud be 45.00 but I am getting 30.0015.00. Any help would be GREATLY appreciated. |
|
#2
|
|||
|
|||
|
You should first verify that the values are, in fact, numbers.
Then you can cast the values as numbers and add them together successfully. For example: Code:
dim dNum1 as double dim dNum2 as double dim dNum3 as double dNum1 = CDbl(unboundtext1.text) dNum2 = CDbl(unboundtext2.text) dNum3 = dNum1 + dNum2 unboundtext3.text = dNum3 |
|
#3
|
|||
|
|||
|
Quote:
THANK YOU!!! |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Is it possible to add two string values?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|