Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > General Computer Discussion > General Computer Support > Calculation two fields in vsual basic

Reply
Thread Tools

Calculation two fields in vsual basic

 
 
asbains asbains is offline
Junior Member
Join Date: Apr 2009
Posts: 1
 
      04-09-2009
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(3.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
File Type: txt InsertNewRecord.txt (13.2 KB, 0 views)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
epydoc: How to add new fields as the building fields? Cyril.Liu Python 0 12-02-2008 05:01 AM
print struct fields and its member structs' fields recursively, generically call_me_anything C++ 4 09-30-2007 10:12 PM
Basic calculation returns incorrect values Dale Reed ASP .Net 3 10-09-2006 03:03 PM
Newbie - Reading a file with delimited fields, storing first two fields in a hash AMT2K5 Perl Misc 1 11-08-2005 01:06 AM
Permission denied error ASP.Net Vsual studio Colin Graham Javascript 3 11-09-2004 01:22 PM



Advertisments