Results 1 to 2 of 2

Thread: Datagrid Calculation

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    10
    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")

  2. #2

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    10
    Update

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