Sorting of a table.

M

musa.biralo

Hi there,

I am banging my head against the wall for this.. Please help.

I have one table (This is basically parent-child .... table in random
order ). My main goal is to put this in a treeview.

TableAA
CoLID ParentCol
Row1 A <null>
Row2 E C
Row3 F E
Row4 D B
Row5 B A
Row 6 C A

I am trying to sort as

CoLID ColParent
Row1 A <null>
Row2 B A
Row3 C A
Row4 D B
Row5 E C
Row 6 F E

Would it be possible at all? What i am actually trying is to put this
table in TreeView. So any idea/help to show the table with above info
(unsorted) in Treeview? One way is to sort the table then we can do
it...

thanks your valuable time.
 
J

John Spencer

Use a saved query instead of the table. You can sort the query.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
M

musa.biralo

Thanks for the response,
Could you please give more suggestion, what kind of query?

Thanks.
Musa.biralo
 
J

John Spencer

Open a new query
-- Add your table
-- Add your fields
-- In the Sort by box under CoLID select Ascending
-- In the fort by box under ColParent select Ascending
-- Save the query with a name - qTableAASorted

Now where you would use the TableAA you can use the qTableAASorted. As
far as doing this in Treeview - post back with a specific question on
how to get this in Treeview.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top