<% 'Holds the original Number Dim strNum 'Holds the new fixed number Dim strNumFixed 'Get the ID usually an AutoNumber field, ' Just comment out or supply your own strYourID = Request.QueryString("ID") 'Sets your connection, I used a system D ' SN in this example Set Con = Server.CreateObject("ADODB.Connection") 'Name of your DSN Con = "YourDSN" 'Sets the RecordSet Set RS = Server.CreateObject("ADODB.Recordset") 'Your SQL string, this will generate the ' Average Number "AS" Average all on the S ' erver SQLString = "SELECT AVG(tblOfRecord.the_colum) AS Average FROM tblOfRecord WHERE " SQLString = SQLString & "tblOfRecord.Your_ID='" & strYourID & "' " 'Open it all up RS.Open SQLString,Con 'Get the Averaged number strNum = RS("Average") 'Fix the number so you dont have a bunch ' of 2.3333333,this will display i.e 2.3 strNumFixed = FormatNumber(strNum,1) 'Display the Correct HTML for your numbe ' r, make it to how you wish. Response.Write "" Response.Write "" Response.Write "" & "AverageNumber" & "" Response.Write "" 'Dont have To have this Response.Write "" Response.Write "" Response.Write "" & strNumFixed & "" Response.Write "" Response.Write "" ' If you are looping through displaying ' more then one average then use the follo ' wing format ' add the same code as above except drop ' the ' strNum = RS("Average") and strNumFixed ' and formatnumber code ' Uncomment this code out ' WHILE NOT RS.EOF ' IF NOT IsNull(RS("Average") ) THEN ' Response.Write "" & FormatNum ' ber(RS("Average"),1) & "" ' ELSE ' Response.Write "no average" ' END IF ' RS.MoveNext ' WEND 'And thats about it works pretty simple ' and alot less code %>