|
-
Sep 19th, 2000, 01:30 PM
#1
Thread Starter
New Member
Hello guys, I can't seem to be able to calculate the datagrid with only 1 record. Instead, I can calculate my records in datagrid accurately. how come/ What shall i do?
Dim no_of_row As Integer
Dim i As Integer
Dim sum As Currency
no_of_row = frmmain.dgditem.VisibleRows
If no_of_row <> 1 Then
For i = 0 To no_of_row - 1
frmmain.dgditem.Row = i
sum = sum + frmmain.dgditem.Columns("Quantity") * frmmain.dgditem.Columns("Price")
Next i
End If
frmmain.lbltotalcost.Caption = Format(sum, "$#.00")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|