% '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 "