here is the SQL statement.
SELECT PARAMETER,
Format(Avg([FieldToAve]),"Standard") AS MeanResult,
Format(((StDev(FieldToSdev)),"Standard") AS SDevResult,
NoofSamples,
(MeanResult+(((SDevResult*t(NoofSamples))/NoofSamples)) as X
FROM Table
Group By FieldToGroup
********************************************************************
and put this t(a) function in the module
Function t(a as integer)
Dim rs As New ADODB.Recordset
rs.Open "Select * From RemoteMaintnance where RemoteID = " & s,
CurrentProject.Connection, adOpenStatic, adLockReadOnly
If rs.RecordCount > 0 Then
X = rs!Max_Flow
Else
X = 0
End If
rs.Close
Set rs = Nothing
End Function
Be sure to supply all necessary data like the table name, fieldname
HTH
arthurjr07@gmail.com - 12 May 2006 02:46 GMT
Used this function instead.
Function t(a as integer)
Dim rs As New ADODB.Recordset
rs.Open "Select taFieldName From FixedTableName where
NoofSampleFieldName = " & a,
CurrentProject.Connection, adOpenStatic, adLockReadOnly
If rs.RecordCount > 0 Then
X = rs!taFieldName
Else
X = 0
End If
rs.Close
Set rs = Nothing
End Function
Replace taFieldName, FixedTableName
and the NoofSampleFieldName
anil - 12 May 2006 04:43 GMT
thanks a lot.
U solved my big problem
it worked well and as well as I wanted.
thanks
anil