How can I add Form Results together?

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

I need to add form results before recording them to my dbase. The problem is
that the '+' symbol does not function as I would expect it to.

DocumentCopies = 55
MailCharge = 5

Subtraction, division and multiplication work:
<% InvoiceTotal = DocumentCopies-Mailcharge %> returns 50
<% InvoiceTotal = DocumentCopies/Mailcharge %> returns 11
<% InvoiceTotal = DocumentCopies*Mailcharge %> returns 275

But
<% InvoiceTotal = DocumentCopies+Mailcharge %> returns 555 (I
expect 60)
does not.

Any suggestions?

Mikeal
 
I figured it out...

When I set the value of DocumentCopies I did this:
<% DocumentCopies = request.form("DocumentCopies")%>

I need to do this:
<% DocumentCopies = CInt(request.form("DocumentCopies"))%>

Mikeal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top