Posted: Tue Oct 10, 2006 5:01 pm Post subject: MS Access sorting problems
Hi, i need to sort a table in access and nothing seems to work so far. Here's the deal. I have a delimited text file that i import to a table. That file is not sorted. What i want to do is sort the table to make modification later. The thing is i want to use VBA coding to do this. So far, the DAO Recordset sort method did not work. I can select a sorted table from the original one, but i dont know how to apply it over the original.
Joined: 11 Jan 2003 Posts: 0 Location: Boston, MA, USA
Posted: Tue Oct 10, 2006 6:13 pm Post subject:
You cannot sort tables in Access. Records always remain in the same order as they were entered. You can temporarily apply a sort to view the record in the order of your choice, but you cannot actually re-order the order of the records.
And, now to contradict myself, you can sort a table in Access, but it takes some work. Essentially, you need to create a query that takes the original data, sorts in to your needs and then puts this data into a new table. The new table will then be "sorted". Delete the old table, and rename the new...
Thanks. I convince my teamate that it wasn't necessary that the table had to be physically sorted. So i only applied the "select order by" statement, did what i needed to do on the table and it worked.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum