This topic is locked
[SOLVED]

  add, not concatenate

10/20/2010 3:49:56 PM
ASPRunnerPro General questions
T
Tim author

Hello,
I am trying to add two fields together, which are numbers, on an Add Page in "Before record added" using the following code:
Session("Total") = values("Num1") + values("Num2")
but this concatenates instead of adding the numbers together. How do I add them up?
Thanks,

Tim

Sergey Kornilov admin 10/21/2010

Try this:

Session("Total") = CDbl(values("Num1")) + CDbl(values("Num2"))
T
Tim author 10/25/2010

That's it! Thank you.