Calculation two fields in vsual basic

Discussion in 'General Computer Support' started by asbains, Apr 9, 2009.

  1. asbains

    asbains

    Joined:
    Apr 9, 2009
    Messages:
    1
    Hi i am very new to visual basic and i am currently working on a web application project in vb but i have come to a standstill and need help. I have a detailsview control on my web page that lets me insert a new record. What i need is to be able to divide the value of two fields and get the total and insert that into another field in the detailsview when a button is clicked. I have attempted some coding:

    Me.DetailsView1.Rows(39).Cells(1).Text = Val(Me.DetailsView1.Rows(38).Cells(1).Text) + Val(Me.DetailsView1.Rows(37).Cells(1).Text) ' * 100

    But this gives me a NaN value but if i replace the / with a plus it gives me 0, i think it is not reading the values put in rows 38 and 37.

    My web page coding is attached with this message

    Any help would be much appreciated.

    Attached Files:

    asbains, Apr 9, 2009
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Um9iIEI=?=

    can electrical fields block wireless transfer?

    =?Utf-8?B?Um9iIEI=?=, Nov 14, 2005, in forum: Wireless Networking
    Replies:
    2
    Views:
    581
    Pavel A.
    Nov 14, 2005
  2. Gary Cox

    Password fields can be copied

    Gary Cox, Oct 12, 2004, in forum: Firefox
    Replies:
    2
    Views:
    1,763
    Gary Cox
    Oct 13, 2004
  3. Jaime
    Replies:
    2
    Views:
    531
    Jaime
    Sep 20, 2003
  4. Jimmy Dean
    Replies:
    3
    Views:
    1,038
    Duane Arnold
    Jul 25, 2005
  5. Sharp Dressed Man

    TurboTax Basic vs. Taxcut Basic?

    Sharp Dressed Man, Jan 10, 2009, in forum: Computer Support
    Replies:
    1
    Views:
    658
    Sharp Dressed Man
    Jan 12, 2009
Loading...

Share This Page