I have a flexgrid here.
I want to calculate mean for every FG row.
My prob is the result for the mean is totally different if we calculate manually.
Here, I enclose the screen shot for my FG and also, the coding.
If u could see from the shot, the value for column "Purata" is the value for the mean.
And the value is not logical.
Pls help.
Thank u in advance.
VB Code:
Private Sub Button7_Click()
On Error Resume Next
Set conn = GetConnection
Set rs = New ADODB.Recordset
If optWeight1.Value = True Then
rs.Open "SELECT weight1.Tarikh, weight1.Sampel1, weight1.Sampel2, weight1.Sampel3, weight1.Sampel4, weight1.Sampel5 FROM weight1 WHERE Tarikh between # " & DTPicker1.Value & " # and # " & DTPicker2.Value & " # ", conn, adOpenStatic, adLockOptimistic
I was thinking its the order of operation problem but your have the parentheses. Try making the first whole term an integer and then dividing that by five.
C#.net, VB, C++, Java, VS 2005/2008
Dont' forget to rate posts that are helpful to you.