Results 1 to 2 of 2

Thread: calculate problems

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Posts
    86

    calculate problems

    can someone help me
    i'm writting a number to database evrything works but
    the script has to calculate something but het don't do that

    when is say
    totaal = ((5 + 5) - 5)
    result is 5

    then i wright it to database like this
    changerank.Fields("punten") = changerank("punten") + totaal

    this result shows 50 because there is already a 0 in the cell

    problem is that he do not now they are numbers
    that's why i wan't to ask you how do i set this as integer

  2. #2
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: calculate problems

    Quote Originally Posted by davyquyo
    can someone help me
    i'm writting a number to database evrything works but
    the script has to calculate something but het don't do that

    when is say
    totaal = ((5 + 5) - 5)
    result is 5

    then i wright it to database like this
    changerank.Fields("punten") = changerank("punten") + totaal

    this result shows 50 because there is already a 0 in the cell

    problem is that he do not now they are numbers
    that's why i wan't to ask you how do i set this as integer
    use cInt function

    e.g

    changerank.Fields("punten") = cInt(changerank("punten")) + cInt(totaal)
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

Posting Permissions

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



Click Here to Expand Forum to Full Width