Re: Sort table, not with SQL!
- From: "Daron" <Daron.Lowell@xxxxxxxxx>
- Date: 1 Nov 2005 07:30:00 -0800
I found a solution to sorting a table!
1) Create a query that will sort the table as needed.
SELECT * FROM tbl_MyTable ORDER BY tbl_MyTable.ValBeginningDate;
I saved this as _qsrt_MySort
2) Put this code in behind your button:
===== Start Code =====
Dim str_Table As String
str_Table = "tbl_MyTable"
Application.Echo False
DoCmd.OpenTable str_Table
DoCmd.ApplyFilter "_qsrt_MySort"
DoCmd.Save acTable, str_Table
DoCmd.Close acTable, str_Table
Application.Echo True
===== End Code =====
This work on repeated attempts.
I hope that this will help someone in the future.
- Daron
.
- Follow-Ups:
- Re: Sort table, not with SQL!
- From: David W. Fenton
- Re: Sort table, not with SQL!
- Prev by Date: A97 - easiest way to have a look at a value entered into a textbox during the BeforeUpdate event?
- Next by Date: Re: VBA332.DLL and AccessXP And Getting Current Folder
- Previous by thread: Re: Sort table, not with SQL!
- Next by thread: Re: Sort table, not with SQL!
- Index(es):
Relevant Pages
|