I have a ASP page linking to an Access database. I am using the folowing crosstab query to create a static table on the webpage:<BR><BR> strSQL = "TRANSFORM Max(TST." & Request("SS") & ") AS MaxOfPC "<BR> strSQL = strSQL & "SELECT STU.SN, STU.LN, STU.FN, MST.PD, STU.GR "<BR> strSQL = strSQL & "FROM MST INNER JOIN ((STU INNER JOIN TST ON STU.SN = TST.SN) INNER JOIN SEC ON STU.SN = SEC.SN) ON MST.SE = SEC.SE "<BR> If cstr(Request("Per")) = "-1" Then<BR> strSQL = strSQL & "WHERE (((TST.ID)=&#039;SAT-9T&#039;) AND ((TST.DT)=&#039;0401&#039;) AND ((MST.TN)=" & cstr(Session("number")) & ")) "<BR> Else<BR> strSQL = strSQL & "WHERE (((TST.ID)=&#039;SAT-9T&#039;) AND ((TST.DT)=&#039;0401&#039;) AND ((MST.TN)=" & cstr(Session("number")) & ") AND ((MST.PD)=" & cstr(Request("Per")) & ")) "<BR> End If<BR> strSQL = strSQL & "GROUP BY STU.SN, STU.LN, STU.FN, MST.PD, STU.GR "<BR> strSQL = strSQL & "ORDER BY MST.PD, STU.GR, STU.LN, STU.FN "<BR> strSQL = strSQL & "PIVOT TST.PT In (1,3,4,5,9,10,11,15,16,20,21,22);"<BR><BR>I know that&#039;s a nice query ;-) My problem is that I need to be able to sort the recordset on the pivoted columns (i.e. 1, 3, 4, 5, 6, etc.) Access will not allow the sort while running the query, which is understandable to a point. So I am left with an unsorted recordset and no way to sort it after the fact. I have been looking for a solution for 3 days now and I&#039;m going insane!!!<BR><BR>I have tried derrived tables which I read about on this site today but they appear to be SQL specific as Access didn&#039;t like my attempt at them. The only options I am seeing is to create a flat table in the database to store the results in and then requery them sorted, or attempt to sort the recordset with the Move ADO Method. Both methods leave me thinking there has to be a better way. Any ideas?