Need some math help

# Thread: Need some math help

1. Senior Member
Join Date
Dec 1969
Posts
2,958

## Need some math help

Never had to do this before so I&#039;m looking to learn. Checked the FAQ&#039;s no reference there.<BR><BR>I need to add pricing dependent on a user selection. <BR>So I wrote, not the whole code but enough to give you the idea:<BR><BR>If request.form("fp") = 1 then<BR>fpp = "224827.00"<BR>end if<BR>If request.form("fp") = 2 then<BR>fpp = "232638.00"<BR>end if<BR><BR>and so on. The other field, "lotp", looks pretty much the same. So now I need to add the 2:<BR><BR>base = (fpp + lotp) Of course that doesn&#039;t work! I&#039;ve tried CInt, formatcurrency and a number of other methods and am now willing to admit I need some help on learning to code math functions. Any teachers would be appreciated.

2. Senior Member
Join Date
Dec 1969
Posts
339

## RE: Need some math help

If request.form("fp") = 1 then <BR>fpp = 224827.00<BR>elsif request.form("fp") = 2 then <BR>fpp = 232638.00<BR>end if <BR><BR>base=Cdbl(fpp)+Cdbl(lotp)<BR><BR><BR>of course you&#039;ll need a lotp value or you will get "0" for an answer. <BR>

3. Senior Member
Join Date
Dec 1969
Posts
2,958

## Yeppers

That did the trick. Thanks for teaching me something new. I had checked the docs but got confused. Maybe it&#039;s the hour? LOL

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•