Hi Cor, I'm still testing this but I do have a question. The 2nd to last
line of code you have "Fig * 100/" & sum.tostring. Won't this give me the
same error that I have been getting all along, because the grand total has
not been calculated at the time that I need to use it to do the division?
I've been getting an "Infinity" error....
\\\
Private Sub Form1_Load(ByVal sender As _
Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
Dim dt As New DataTable("Coleen")
dt.Columns.Add("Fig", GetType(System.Int32))
dt.Columns.Add("Perc", GetType(System.Int32))
For i As Integer = 0 To 5
Dim dr As DataRow = dt.NewRow
dr(0) = i + 1
dt.Rows.Add(dr)
Next
Dim dr2 As DataRow = dt.NewRow
Dim sum As Integer = _
CInt(dt.Compute("Sum(Fig)", ""))
dr2(0) = sum
dt.Rows.Add(dr2)
dt.Columns(1).Expression = _
"Fig * 100/ " & sum.ToString
DataGrid1.DataSource = dt
End Sub
///
"Coleen" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All :-)
>
> Cor & David, Thank you for your help, sorry I did not reply before now,
but
> for some reason my Newsgroup Reader (Outlook) does not show your last
posts.
> The last one I got from Cor was asking me to clarify what I needed. I
> checked in the Web Newsgroup, and found your posts. I don't know why they
> don't show up in my Outlook reader, but they don't. I got your solution
> Cor, and it does look amazingly simple! I am in the process of trying it
> now, and I will let you know of the results. I just wanted to say thank
> you, and Since I couldn't get my reader to come up with the most current
> posts, I started a new thread.
>
> I will let you know how it works, and again THANKS!
>
> Coleen
>
>
|