Sorry to cross-post, but I need some help with this fast, and I figure it may be actually more a database issue than anything else.

I'm doing a simple doc mgmt system in Access & ASP. The table structure for folders is
ID.Parent.Name
and I am trying to generate an indented list of folders/tree view.

My current (recursive) function is
Function GetFolderList(Folder)

SQL = "SELECT ID, Parent,Name "
SQL = SQL & "FROM Folders "
SQL = SQL & "WHERE "
SQL = SQL & "Parent =" & Folder & " "
SQL = SQL & "ORDER BY Parent,Name ASC,ID"

Set rs = dataConn.Execute(SQL)

If NOT rs.EOF Then
While NOT rs.EOF
%><%= rs("Name") %><br><%
Call GetFolderList(rs("ID"))
rs.MoveNext : WEnd
End If

rs.Close
Set rs = Nothing

End Function
This gives me the parent folders and their subfolders, but how can I print them out indented, showing the tree structure?

Any ideas?