Demo: http://asp2004.net/temp/treemenu/Menu.asp Source Code Download: http://asp2004.net/temp/treemenu.rar <% DIM STRFUNCTION MENU (ID) SET RS = Server.createObject ("AdoDb.Recordset") SQL = "SELECT * from menu where id1 =" & id "r r r r ropen sql, conn, 1, 1 = STR "